##########################################################################
#
# Copyright 2008-2009 VMware, Inc.
# All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
##########################################################################/

from gl import *
from windows import *

opengl32 = Dll("opengl32")
opengl32.functions += [
    DllFunction(Void, "glNewList", [(GLuint, "list"), (GLenum, "mode")]),
    DllFunction(Void, "glEndList", []),
    DllFunction(Void, "glCallList", [(GLuint, "list")]),
    DllFunction(Void, "glCallLists", [(GLsizei, "n"), (GLenum, "type"), (Pointer(Const(GLvoid)), "lists")]),
    DllFunction(Void, "glDeleteLists", [(GLuint, "list"), (GLsizei, "range")]),
    DllFunction(GLuint, "glGenLists", [(GLsizei, "range")]),
    DllFunction(Void, "glListBase", [(GLuint, "base")]),
    DllFunction(Void, "glBegin", [(GLprimenum, "mode")]),
    DllFunction(Void, "glBitmap", [(GLsizei, "width"), (GLsizei, "height"), (GLfloat, "xorig"), (GLfloat, "yorig"), (GLfloat, "xmove"), (GLfloat, "ymove"), (Pointer(Const(GLubyte)), "bitmap")]),
    DllFunction(Void, "glColor3b", [(GLbyte, "red"), (GLbyte, "green"), (GLbyte, "blue")]),
    DllFunction(Void, "glColor3bv", [(Array(Const(GLbyte), "3"), "v")]),
    DllFunction(Void, "glColor3d", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue")]),
    DllFunction(Void, "glColor3dv", [(Array(Const(GLdouble), "3"), "v")]),
    DllFunction(Void, "glColor3f", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue")]),
    DllFunction(Void, "glColor3fv", [(Array(Const(GLfloat), "3"), "v")]),
    DllFunction(Void, "glColor3i", [(GLint, "red"), (GLint, "green"), (GLint, "blue")]),
    DllFunction(Void, "glColor3iv", [(Array(Const(GLint), "3"), "v")]),
    DllFunction(Void, "glColor3s", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue")]),
    DllFunction(Void, "glColor3sv", [(Array(Const(GLshort), "3"), "v")]),
    DllFunction(Void, "glColor3ub", [(GLubyte, "red"), (GLubyte, "green"), (GLubyte, "blue")]),
    DllFunction(Void, "glColor3ubv", [(Array(Const(GLubyte), "3"), "v")]),
    DllFunction(Void, "glColor3ui", [(GLuint, "red"), (GLuint, "green"), (GLuint, "blue")]),
    DllFunction(Void, "glColor3uiv", [(Array(Const(GLuint), "3"), "v")]),
    DllFunction(Void, "glColor3us", [(GLushort, "red"), (GLushort, "green"), (GLushort, "blue")]),
    DllFunction(Void, "glColor3usv", [(Array(Const(GLushort), "3"), "v")]),
    DllFunction(Void, "glColor4b", [(GLbyte, "red"), (GLbyte, "green"), (GLbyte, "blue"), (GLbyte, "alpha")]),
    DllFunction(Void, "glColor4bv", [(Array(Const(GLbyte), "4"), "v")]),
    DllFunction(Void, "glColor4d", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue"), (GLdouble, "alpha")]),
    DllFunction(Void, "glColor4dv", [(Array(Const(GLdouble), "4"), "v")]),
    DllFunction(Void, "glColor4f", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue"), (GLfloat, "alpha")]),
    DllFunction(Void, "glColor4fv", [(Array(Const(GLfloat), "4"), "v")]),
    DllFunction(Void, "glColor4i", [(GLint, "red"), (GLint, "green"), (GLint, "blue"), (GLint, "alpha")]),
    DllFunction(Void, "glColor4iv", [(Array(Const(GLint), "4"), "v")]),
    DllFunction(Void, "glColor4s", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue"), (GLshort, "alpha")]),
    DllFunction(Void, "glColor4sv", [(Array(Const(GLshort), "4"), "v")]),
    DllFunction(Void, "glColor4ub", [(GLubyte, "red"), (GLubyte, "green"), (GLubyte, "blue"), (GLubyte, "alpha")]),
    DllFunction(Void, "glColor4ubv", [(Array(Const(GLubyte), "4"), "v")]),
    DllFunction(Void, "glColor4ui", [(GLuint, "red"), (GLuint, "green"), (GLuint, "blue"), (GLuint, "alpha")]),
    DllFunction(Void, "glColor4uiv", [(Array(Const(GLuint), "4"), "v")]),
    DllFunction(Void, "glColor4us", [(GLushort, "red"), (GLushort, "green"), (GLushort, "blue"), (GLushort, "alpha")]),
    DllFunction(Void, "glColor4usv", [(Array(Const(GLushort), "4"), "v")]),
    DllFunction(Void, "glEdgeFlag", [(GLboolean, "flag")]),
    DllFunction(Void, "glEdgeFlagv", [(Array(Const(GLboolean), "1"), "flag")]),
    DllFunction(Void, "glEnd", []),
    DllFunction(Void, "glIndexd", [(GLdouble, "c")]),
    DllFunction(Void, "glIndexdv", [(Array(Const(GLdouble), "1"), "c")]),
    DllFunction(Void, "glIndexf", [(GLfloat, "c")]),
    DllFunction(Void, "glIndexfv", [(Array(Const(GLfloat), "1"), "c")]),
    DllFunction(Void, "glIndexi", [(GLint, "c")]),
    DllFunction(Void, "glIndexiv", [(Array(Const(GLint), "1"), "c")]),
    DllFunction(Void, "glIndexs", [(GLshort, "c")]),
    DllFunction(Void, "glIndexsv", [(Array(Const(GLshort), "1"), "c")]),
    DllFunction(Void, "glNormal3b", [(GLbyte, "nx"), (GLbyte, "ny"), (GLbyte, "nz")]),
    DllFunction(Void, "glNormal3bv", [(Array(Const(GLbyte), "3"), "v")]),
    DllFunction(Void, "glNormal3d", [(GLdouble, "nx"), (GLdouble, "ny"), (GLdouble, "nz")]),
    DllFunction(Void, "glNormal3dv", [(Array(Const(GLdouble), "3"), "v")]),
    DllFunction(Void, "glNormal3f", [(GLfloat, "nx"), (GLfloat, "ny"), (GLfloat, "nz")]),
    DllFunction(Void, "glNormal3fv", [(Array(Const(GLfloat), "3"), "v")]),
    DllFunction(Void, "glNormal3i", [(GLint, "nx"), (GLint, "ny"), (GLint, "nz")]),
    DllFunction(Void, "glNormal3iv", [(Array(Const(GLint), "3"), "v")]),
    DllFunction(Void, "glNormal3s", [(GLshort, "nx"), (GLshort, "ny"), (GLshort, "nz")]),
    DllFunction(Void, "glNormal3sv", [(Array(Const(GLshort), "3"), "v")]),
    DllFunction(Void, "glRasterPos2d", [(GLdouble, "x"), (GLdouble, "y")]),
    DllFunction(Void, "glRasterPos2dv", [(Array(Const(GLdouble), "2"), "v")]),
    DllFunction(Void, "glRasterPos2f", [(GLfloat, "x"), (GLfloat, "y")]),
    DllFunction(Void, "glRasterPos2fv", [(Array(Const(GLfloat), "2"), "v")]),
    DllFunction(Void, "glRasterPos2i", [(GLint, "x"), (GLint, "y")]),
    DllFunction(Void, "glRasterPos2iv", [(Array(Const(GLint), "2"), "v")]),
    DllFunction(Void, "glRasterPos2s", [(GLshort, "x"), (GLshort, "y")]),
    DllFunction(Void, "glRasterPos2sv", [(Array(Const(GLshort), "2"), "v")]),
    DllFunction(Void, "glRasterPos3d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
    DllFunction(Void, "glRasterPos3dv", [(Array(Const(GLdouble), "3"), "v")]),
    DllFunction(Void, "glRasterPos3f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
    DllFunction(Void, "glRasterPos3fv", [(Array(Const(GLfloat), "3"), "v")]),
    DllFunction(Void, "glRasterPos3i", [(GLint, "x"), (GLint, "y"), (GLint, "z")]),
    DllFunction(Void, "glRasterPos3iv", [(Array(Const(GLint), "3"), "v")]),
    DllFunction(Void, "glRasterPos3s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
    DllFunction(Void, "glRasterPos3sv", [(Array(Const(GLshort), "3"), "v")]),
    DllFunction(Void, "glRasterPos4d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
    DllFunction(Void, "glRasterPos4dv", [(Array(Const(GLdouble), "4"), "v")]),
    DllFunction(Void, "glRasterPos4f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
    DllFunction(Void, "glRasterPos4fv", [(Array(Const(GLfloat), "4"), "v")]),
    DllFunction(Void, "glRasterPos4i", [(GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]),
    DllFunction(Void, "glRasterPos4iv", [(Array(Const(GLint), "4"), "v")]),
    DllFunction(Void, "glRasterPos4s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
    DllFunction(Void, "glRasterPos4sv", [(Array(Const(GLshort), "4"), "v")]),
    DllFunction(Void, "glRectd", [(GLdouble, "x1"), (GLdouble, "y1"), (GLdouble, "x2"), (GLdouble, "y2")]),
    DllFunction(Void, "glRectdv", [(Array(Const(GLdouble), "2"), "v1"), (Array(Const(GLdouble), "2"), "v2")]),
    DllFunction(Void, "glRectf", [(GLfloat, "x1"), (GLfloat, "y1"), (GLfloat, "x2"), (GLfloat, "y2")]),
    DllFunction(Void, "glRectfv", [(Array(Const(GLfloat), "2"), "v1"), (Array(Const(GLfloat), "2"), "v2")]),
    DllFunction(Void, "glRecti", [(GLint, "x1"), (GLint, "y1"), (GLint, "x2"), (GLint, "y2")]),
    DllFunction(Void, "glRectiv", [(Array(Const(GLint), "2"), "v1"), (Array(Const(GLint), "2"), "v2")]),
    DllFunction(Void, "glRects", [(GLshort, "x1"), (GLshort, "y1"), (GLshort, "x2"), (GLshort, "y2")]),
    DllFunction(Void, "glRectsv", [(Array(Const(GLshort), "2"), "v1"), (Array(Const(GLshort), "2"), "v2")]),
    DllFunction(Void, "glTexCoord1d", [(GLdouble, "s")]),
    DllFunction(Void, "glTexCoord1dv", [(Array(Const(GLdouble), "1"), "v")]),
    DllFunction(Void, "glTexCoord1f", [(GLfloat, "s")]),
    DllFunction(Void, "glTexCoord1fv", [(Array(Const(GLfloat), "1"), "v")]),
    DllFunction(Void, "glTexCoord1i", [(GLint, "s")]),
    DllFunction(Void, "glTexCoord1iv", [(Array(Const(GLint), "1"), "v")]),
    DllFunction(Void, "glTexCoord1s", [(GLshort, "s")]),
    DllFunction(Void, "glTexCoord1sv", [(Array(Const(GLshort), "1"), "v")]),
    DllFunction(Void, "glTexCoord2d", [(GLdouble, "s"), (GLdouble, "t")]),
    DllFunction(Void, "glTexCoord2dv", [(Array(Const(GLdouble), "2"), "v")]),
    DllFunction(Void, "glTexCoord2f", [(GLfloat, "s"), (GLfloat, "t")]),
    DllFunction(Void, "glTexCoord2fv", [(Array(Const(GLfloat), "2"), "v")]),
    DllFunction(Void, "glTexCoord2i", [(GLint, "s"), (GLint, "t")]),
    DllFunction(Void, "glTexCoord2iv", [(Array(Const(GLint), "2"), "v")]),
    DllFunction(Void, "glTexCoord2s", [(GLshort, "s"), (GLshort, "t")]),
    DllFunction(Void, "glTexCoord2sv", [(Array(Const(GLshort), "2"), "v")]),
    DllFunction(Void, "glTexCoord3d", [(GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r")]),
    DllFunction(Void, "glTexCoord3dv", [(Array(Const(GLdouble), "3"), "v")]),
    DllFunction(Void, "glTexCoord3f", [(GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r")]),
    DllFunction(Void, "glTexCoord3fv", [(Array(Const(GLfloat), "3"), "v")]),
    DllFunction(Void, "glTexCoord3i", [(GLint, "s"), (GLint, "t"), (GLint, "r")]),
    DllFunction(Void, "glTexCoord3iv", [(Array(Const(GLint), "3"), "v")]),
    DllFunction(Void, "glTexCoord3s", [(GLshort, "s"), (GLshort, "t"), (GLshort, "r")]),
    DllFunction(Void, "glTexCoord3sv", [(Array(Const(GLshort), "3"), "v")]),
    DllFunction(Void, "glTexCoord4d", [(GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r"), (GLdouble, "q")]),
    DllFunction(Void, "glTexCoord4dv", [(Array(Const(GLdouble), "4"), "v")]),
    DllFunction(Void, "glTexCoord4f", [(GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r"), (GLfloat, "q")]),
    DllFunction(Void, "glTexCoord4fv", [(Array(Const(GLfloat), "4"), "v")]),
    DllFunction(Void, "glTexCoord4i", [(GLint, "s"), (GLint, "t"), (GLint, "r"), (GLint, "q")]),
    DllFunction(Void, "glTexCoord4iv", [(Array(Const(GLint), "4"), "v")]),
    DllFunction(Void, "glTexCoord4s", [(GLshort, "s"), (GLshort, "t"), (GLshort, "r"), (GLshort, "q")]),
    DllFunction(Void, "glTexCoord4sv", [(Array(Const(GLshort), "4"), "v")]),
    DllFunction(Void, "glVertex2d", [(GLdouble, "x"), (GLdouble, "y")]),
    DllFunction(Void, "glVertex2dv", [(Array(Const(GLdouble), "2"), "v")]),
    DllFunction(Void, "glVertex2f", [(GLfloat, "x"), (GLfloat, "y")]),
    DllFunction(Void, "glVertex2fv", [(Array(Const(GLfloat), "2"), "v")]),
    DllFunction(Void, "glVertex2i", [(GLint, "x"), (GLint, "y")]),
    DllFunction(Void, "glVertex2iv", [(Array(Const(GLint), "2"), "v")]),
    DllFunction(Void, "glVertex2s", [(GLshort, "x"), (GLshort, "y")]),
    DllFunction(Void, "glVertex2sv", [(Array(Const(GLshort), "2"), "v")]),
    DllFunction(Void, "glVertex3d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
    DllFunction(Void, "glVertex3dv", [(Array(Const(GLdouble), "3"), "v")]),
    DllFunction(Void, "glVertex3f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
    DllFunction(Void, "glVertex3fv", [(Array(Const(GLfloat), "3"), "v")]),
    DllFunction(Void, "glVertex3i", [(GLint, "x"), (GLint, "y"), (GLint, "z")]),
    DllFunction(Void, "glVertex3iv", [(Array(Const(GLint), "3"), "v")]),
    DllFunction(Void, "glVertex3s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
    DllFunction(Void, "glVertex3sv", [(Array(Const(GLshort), "3"), "v")]),
    DllFunction(Void, "glVertex4d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
    DllFunction(Void, "glVertex4dv", [(Array(Const(GLdouble), "4"), "v")]),
    DllFunction(Void, "glVertex4f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
    DllFunction(Void, "glVertex4fv", [(Array(Const(GLfloat), "4"), "v")]),
    DllFunction(Void, "glVertex4i", [(GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]),
    DllFunction(Void, "glVertex4iv", [(Array(Const(GLint), "4"), "v")]),
    DllFunction(Void, "glVertex4s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
    DllFunction(Void, "glVertex4sv", [(Array(Const(GLshort), "4"), "v")]),
    DllFunction(Void, "glClipPlane", [(GLenum, "plane"), (Array(Const(GLdouble), "4"), "equation")]),
    DllFunction(Void, "glColorMaterial", [(GLenum, "face"), (GLenum, "mode")]),
    DllFunction(Void, "glCullFace", [(GLenum, "mode")]),
    DllFunction(Void, "glFogf", [(GLenum, "pname"), (GLfloat, "param")]),
    DllFunction(Void, "glFogfv", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
    DllFunction(Void, "glFogi", [(GLenum, "pname"), (GLint, "param")]),
    DllFunction(Void, "glFogiv", [(GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
    DllFunction(Void, "glFrontFace", [(GLenum, "mode")]),
    DllFunction(Void, "glHint", [(GLenum, "target"), (GLenum, "mode")]),
    DllFunction(Void, "glLightf", [(GLenum, "light"), (GLenum, "pname"), (GLfloat, "param")]),
    DllFunction(Void, "glLightfv", [(GLenum, "light"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
    DllFunction(Void, "glLighti", [(GLenum, "light"), (GLenum, "pname"), (GLint, "param")]),
    DllFunction(Void, "glLightiv", [(GLenum, "light"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
    DllFunction(Void, "glLightModelf", [(GLenum, "pname"), (GLfloat, "param")]),
    DllFunction(Void, "glLightModelfv", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
    DllFunction(Void, "glLightModeli", [(GLenum, "pname"), (GLint, "param")]),
    DllFunction(Void, "glLightModeliv", [(GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
    DllFunction(Void, "glLineStipple", [(GLint, "factor"), (GLushort, "pattern")]),
    DllFunction(Void, "glLineWidth", [(GLfloat, "width")]),
    DllFunction(Void, "glMaterialf", [(GLenum, "face"), (GLenum, "pname"), (GLfloat, "param")]),
    DllFunction(Void, "glMaterialfv", [(GLenum, "face"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
    DllFunction(Void, "glMateriali", [(GLenum, "face"), (GLenum, "pname"), (GLint, "param")]),
    DllFunction(Void, "glMaterialiv", [(GLenum, "face"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
    DllFunction(Void, "glPointSize", [(GLfloat, "size")]),
    DllFunction(Void, "glPolygonMode", [(GLenum, "face"), (GLenum, "mode")]),
    DllFunction(Void, "glPolygonStipple", [(Pointer(Const(GLubyte)), "mask")]),
    DllFunction(Void, "glScissor", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
    DllFunction(Void, "glShadeModel", [(GLenum, "mode")]),
    DllFunction(Void, "glTexParameterf", [(GLenum, "target"), (GLenum, "pname"), (GLfloat, "param")]),
    DllFunction(Void, "glTexParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
    DllFunction(Void, "glTexParameteri", [(GLenum, "target"), (GLenum, "pname"), (GLint, "param")]),
    DllFunction(Void, "glTexParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
    DllFunction(Void, "glTexImage1D", [(GLenum, "target"), (GLint, "level"), (GLint, "internalformat"), (GLsizei, "width"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]),
    DllFunction(Void, "glTexImage2D", [(GLenum, "target"), (GLint, "level"), (GLint, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]),
    DllFunction(Void, "glTexEnvf", [(GLenum, "target"), (GLenum, "pname"), (GLfloat, "param")]),
    DllFunction(Void, "glTexEnvfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
    DllFunction(Void, "glTexEnvi", [(GLenum, "target"), (GLenum, "pname"), (GLint, "param")]),
    DllFunction(Void, "glTexEnviv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
    DllFunction(Void, "glTexGend", [(GLenum, "coord"), (GLenum, "pname"), (GLdouble, "param")]),
    DllFunction(Void, "glTexGendv", [(GLenum, "coord"), (GLenum, "pname"), (Pointer(Const(GLdouble)), "params")]),
    DllFunction(Void, "glTexGenf", [(GLenum, "coord"), (GLenum, "pname"), (GLfloat, "param")]),
    DllFunction(Void, "glTexGenfv", [(GLenum, "coord"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
    DllFunction(Void, "glTexGeni", [(GLenum, "coord"), (GLenum, "pname"), (GLint, "param")]),
    DllFunction(Void, "glTexGeniv", [(GLenum, "coord"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
    DllFunction(Void, "glFeedbackBuffer", [(GLsizei, "size"), (GLenum, "type"), (OutPointer(GLfloat), "buffer")]),
    DllFunction(Void, "glSelectBuffer", [(GLsizei, "size"), (OutPointer(GLuint), "buffer")]),
    DllFunction(GLint, "glRenderMode", [(GLenum, "mode")]),
    DllFunction(Void, "glInitNames", []),
    DllFunction(Void, "glLoadName", [(GLuint, "name")]),
    DllFunction(Void, "glPassThrough", [(GLfloat, "token")]),
    DllFunction(Void, "glPopName", []),
    DllFunction(Void, "glPushName", [(GLuint, "name")]),
    DllFunction(Void, "glDrawBuffer", [(GLenum, "mode")]),
    DllFunction(Void, "glClear", [(GLbufferbitfield, "mask")]),
    DllFunction(Void, "glClearAccum", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue"), (GLfloat, "alpha")]),
    DllFunction(Void, "glClearIndex", [(GLfloat, "c")]),
    DllFunction(Void, "glClearColor", [(GLclampf, "red"), (GLclampf, "green"), (GLclampf, "blue"), (GLclampf, "alpha")]),
    DllFunction(Void, "glClearStencil", [(GLint, "s")]),
    DllFunction(Void, "glClearDepth", [(GLclampd, "depth")]),
    DllFunction(Void, "glStencilMask", [(GLuint, "mask")]),
    DllFunction(Void, "glColorMask", [(GLboolean, "red"), (GLboolean, "green"), (GLboolean, "blue"), (GLboolean, "alpha")]),
    DllFunction(Void, "glDepthMask", [(GLboolean, "flag")]),
    DllFunction(Void, "glIndexMask", [(GLuint, "mask")]),
    DllFunction(Void, "glAccum", [(GLenum, "op"), (GLfloat, "value")]),
    DllFunction(Void, "glDisable", [(GLenum, "cap")]),
    DllFunction(Void, "glEnable", [(GLenum, "cap")]),
    DllFunction(Void, "glFinish", []),
    DllFunction(Void, "glFlush", []),
    DllFunction(Void, "glPopAttrib", []),
    DllFunction(Void, "glPushAttrib", [(GLbitfield, "mask")]),
    DllFunction(Void, "glMap1d", [(GLenum, "target"), (GLdouble, "u1"), (GLdouble, "u2"), (GLint, "stride"), (GLint, "order"), (Pointer(Const(GLdouble)), "points")]),
    DllFunction(Void, "glMap1f", [(GLenum, "target"), (GLfloat, "u1"), (GLfloat, "u2"), (GLint, "stride"), (GLint, "order"), (Pointer(Const(GLfloat)), "points")]),
    DllFunction(Void, "glMap2d", [(GLenum, "target"), (GLdouble, "u1"), (GLdouble, "u2"), (GLint, "ustride"), (GLint, "uorder"), (GLdouble, "v1"), (GLdouble, "v2"), (GLint, "vstride"), (GLint, "vorder"), (Pointer(Const(GLdouble)), "points")]),
    DllFunction(Void, "glMap2f", [(GLenum, "target"), (GLfloat, "u1"), (GLfloat, "u2"), (GLint, "ustride"), (GLint, "uorder"), (GLfloat, "v1"), (GLfloat, "v2"), (GLint, "vstride"), (GLint, "vorder"), (Pointer(Const(GLfloat)), "points")]),
    DllFunction(Void, "glMapGrid1d", [(GLint, "un"), (GLdouble, "u1"), (GLdouble, "u2")]),
    DllFunction(Void, "glMapGrid1f", [(GLint, "un"), (GLfloat, "u1"), (GLfloat, "u2")]),
    DllFunction(Void, "glMapGrid2d", [(GLint, "un"), (GLdouble, "u1"), (GLdouble, "u2"), (GLint, "vn"), (GLdouble, "v1"), (GLdouble, "v2")]),
    DllFunction(Void, "glMapGrid2f", [(GLint, "un"), (GLfloat, "u1"), (GLfloat, "u2"), (GLint, "vn"), (GLfloat, "v1"), (GLfloat, "v2")]),
    DllFunction(Void, "glEvalCoord1d", [(GLdouble, "u")]),
    DllFunction(Void, "glEvalCoord1dv", [(Array(Const(GLdouble), "1"), "u")]),
    DllFunction(Void, "glEvalCoord1f", [(GLfloat, "u")]),
    DllFunction(Void, "glEvalCoord1fv", [(Array(Const(GLfloat), "1"), "u")]),
    DllFunction(Void, "glEvalCoord2d", [(GLdouble, "u"), (GLdouble, "v")]),
    DllFunction(Void, "glEvalCoord2dv", [(Array(Const(GLdouble), "2"), "u")]),
    DllFunction(Void, "glEvalCoord2f", [(GLfloat, "u"), (GLfloat, "v")]),
    DllFunction(Void, "glEvalCoord2fv", [(Array(Const(GLfloat), "2"), "u")]),
    DllFunction(Void, "glEvalMesh1", [(GLenum, "mode"), (GLint, "i1"), (GLint, "i2")]),
    DllFunction(Void, "glEvalPoint1", [(GLint, "i")]),
    DllFunction(Void, "glEvalMesh2", [(GLenum, "mode"), (GLint, "i1"), (GLint, "i2"), (GLint, "j1"), (GLint, "j2")]),
    DllFunction(Void, "glEvalPoint2", [(GLint, "i"), (GLint, "j")]),
    DllFunction(Void, "glAlphaFunc", [(GLenum, "func"), (GLclampf, "ref")]),
    DllFunction(Void, "glBlendFunc", [(GLenum, "sfactor"), (GLenum, "dfactor")]),
    DllFunction(Void, "glLogicOp", [(GLenum, "opcode")]),
    DllFunction(Void, "glStencilFunc", [(GLenum, "func"), (GLint, "ref"), (GLuint, "mask")]),
    DllFunction(Void, "glStencilOp", [(GLenum, "fail"), (GLenum, "zfail"), (GLenum, "zpass")]),
    DllFunction(Void, "glDepthFunc", [(GLenum, "func")]),
    DllFunction(Void, "glPixelZoom", [(GLfloat, "xfactor"), (GLfloat, "yfactor")]),
    DllFunction(Void, "glPixelTransferf", [(GLenum, "pname"), (GLfloat, "param")]),
    DllFunction(Void, "glPixelTransferi", [(GLenum, "pname"), (GLint, "param")]),
    DllFunction(Void, "glPixelStoref", [(GLenum, "pname"), (GLfloat, "param")]),
    DllFunction(Void, "glPixelStorei", [(GLenum, "pname"), (GLint, "param")]),
    DllFunction(Void, "glPixelMapfv", [(GLenum, "map"), (GLsizei, "mapsize"), (Pointer(Const(GLfloat)), "values")]),
    DllFunction(Void, "glPixelMapuiv", [(GLenum, "map"), (GLsizei, "mapsize"), (Pointer(Const(GLuint)), "values")]),
    DllFunction(Void, "glPixelMapusv", [(GLenum, "map"), (GLsizei, "mapsize"), (Pointer(Const(GLushort)), "values")]),
    DllFunction(Void, "glReadBuffer", [(GLenum, "mode")]),
    DllFunction(Void, "glCopyPixels", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "type")]),
    DllFunction(Void, "glReadPixels", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (OutPointer(GLvoid), "pixels")]),
    DllFunction(Void, "glDrawPixels", [(GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]),
    DllFunction(Void, "glGetBooleanv", [(GLenum, "pname"), (OutPointer(GLboolean), "params")]),
    DllFunction(Void, "glGetClipPlane", [(GLenum, "plane"), (OutArray(GLdouble, "4"), "equation")]),
    DllFunction(Void, "glGetDoublev", [(GLenum, "pname"), (OutPointer(GLdouble), "params")]),
    DllFunction(GLenum, "glGetError", []),
    DllFunction(Void, "glGetFloatv", [(GLenum, "pname"), (OutPointer(GLfloat), "params")]),
    DllFunction(Void, "glGetIntegerv", [(GLenum, "pname"), (OutPointer(GLint), "params")]),
    DllFunction(Void, "glGetLightfv", [(GLenum, "light"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
    DllFunction(Void, "glGetLightiv", [(GLenum, "light"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    DllFunction(Void, "glGetMapdv", [(GLenum, "target"), (GLenum, "query"), (OutPointer(GLdouble), "v")]),
    DllFunction(Void, "glGetMapfv", [(GLenum, "target"), (GLenum, "query"), (OutPointer(GLfloat), "v")]),
    DllFunction(Void, "glGetMapiv", [(GLenum, "target"), (GLenum, "query"), (OutPointer(GLint), "v")]),
    DllFunction(Void, "glGetMaterialfv", [(GLenum, "face"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
    DllFunction(Void, "glGetMaterialiv", [(GLenum, "face"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    DllFunction(Void, "glGetPixelMapfv", [(GLenum, "map"), (OutPointer(GLfloat), "values")]),
    DllFunction(Void, "glGetPixelMapuiv", [(GLenum, "map"), (OutPointer(GLuint), "values")]),
    DllFunction(Void, "glGetPixelMapusv", [(GLenum, "map"), (OutPointer(GLushort), "values")]),
    DllFunction(Void, "glGetPolygonStipple", [(OutPointer(GLubyte), "mask")]),
    DllFunction(Alias("const GLubyte *", String), "glGetString", [(GLenum, "name")]),
    DllFunction(Void, "glGetTexEnvfv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
    DllFunction(Void, "glGetTexEnviv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    DllFunction(Void, "glGetTexGendv", [(GLenum, "coord"), (GLenum, "pname"), (OutPointer(GLdouble), "params")]),
    DllFunction(Void, "glGetTexGenfv", [(GLenum, "coord"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
    DllFunction(Void, "glGetTexGeniv", [(GLenum, "coord"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    DllFunction(Void, "glGetTexImage", [(GLenum, "target"), (GLint, "level"), (GLenum, "format"), (GLenum, "type"), (OutPointer(GLvoid), "pixels")]),
    DllFunction(Void, "glGetTexParameterfv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
    DllFunction(Void, "glGetTexParameteriv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    DllFunction(Void, "glGetTexLevelParameterfv", [(GLenum, "target"), (GLint, "level"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
    DllFunction(Void, "glGetTexLevelParameteriv", [(GLenum, "target"), (GLint, "level"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    DllFunction(GLboolean, "glIsEnabled", [(GLenum, "cap")]),
    DllFunction(GLboolean, "glIsList", [(GLuint, "list")]),
    DllFunction(Void, "glDepthRange", [(GLclampd, "zNear"), (GLclampd, "zFar")]),
    DllFunction(Void, "glFrustum", [(GLdouble, "left"), (GLdouble, "right"), (GLdouble, "bottom"), (GLdouble, "top"), (GLdouble, "zNear"), (GLdouble, "zFar")]),
    DllFunction(Void, "glLoadIdentity", []),
    DllFunction(Void, "glLoadMatrixf", [(Array(Const(GLfloat), "16"), "m")]),
    DllFunction(Void, "glLoadMatrixd", [(Array(Const(GLdouble), "16"), "m")]),
    DllFunction(Void, "glMatrixMode", [(GLenum, "mode")]),
    DllFunction(Void, "glMultMatrixf", [(Array(Const(GLfloat), "16"), "m")]),
    DllFunction(Void, "glMultMatrixd", [(Array(Const(GLdouble), "16"), "m")]),
    DllFunction(Void, "glOrtho", [(GLdouble, "left"), (GLdouble, "right"), (GLdouble, "bottom"), (GLdouble, "top"), (GLdouble, "zNear"), (GLdouble, "zFar")]),
    DllFunction(Void, "glPopMatrix", []),
    DllFunction(Void, "glPushMatrix", []),
    DllFunction(Void, "glRotated", [(GLdouble, "angle"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
    DllFunction(Void, "glRotatef", [(GLfloat, "angle"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
    DllFunction(Void, "glScaled", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
    DllFunction(Void, "glScalef", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
    DllFunction(Void, "glTranslated", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
    DllFunction(Void, "glTranslatef", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
    DllFunction(Void, "glViewport", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
    DllFunction(Void, "glArrayElement", [(GLint, "i")]),
    DllFunction(Void, "glBindTexture", [(GLenum, "target"), (GLuint, "texture")]),
    DllFunction(Void, "glColorPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
    DllFunction(Void, "glDisableClientState", [(GLenum, "array")]),
    DllFunction(Void, "glDrawArrays", [(GLenum, "mode"), (GLint, "first"), (GLsizei, "count")]),
    DllFunction(Void, "glDrawElements", [(GLenum, "mode"), (GLsizei, "count"), (GLenum, "type"), (Pointer(Const(GLvoid)), "indices")]),
    DllFunction(Void, "glEdgeFlagPointer", [(GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
    DllFunction(Void, "glEnableClientState", [(GLenum, "array")]),
    DllFunction(Void, "glIndexPointer", [(GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
    DllFunction(Void, "glIndexub", [(GLubyte, "c")]),
    DllFunction(Void, "glIndexubv", [(Array(Const(GLubyte), "1"), "c")]),
    DllFunction(Void, "glInterleavedArrays", [(GLenum, "format"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
    DllFunction(Void, "glNormalPointer", [(GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
    DllFunction(Void, "glPolygonOffset", [(GLfloat, "factor"), (GLfloat, "units")]),
    DllFunction(Void, "glTexCoordPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
    DllFunction(Void, "glVertexPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
    DllFunction(GLboolean, "glAreTexturesResident", [(GLsizei, "n"), (Pointer(Const(GLuint)), "textures"), (OutPointer(GLboolean), "residences")]),
    DllFunction(Void, "glCopyTexImage1D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLint, "border")]),
    DllFunction(Void, "glCopyTexImage2D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height"), (GLint, "border")]),
    DllFunction(Void, "glCopyTexSubImage1D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]),
    DllFunction(Void, "glCopyTexSubImage2D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
    DllFunction(Void, "glDeleteTextures", [(GLsizei, "n"), (Pointer(Const(GLuint)), "textures")]),
    DllFunction(Void, "glGenTextures", [(GLsizei, "n"), (OutPointer(GLuint), "textures")]),
    DllFunction(Void, "glGetPointerv", [(GLenum, "pname"), (OutPointer(Pointer(GLvoid)), "params")]),
    DllFunction(GLboolean, "glIsTexture", [(GLuint, "texture")]),
    DllFunction(Void, "glPrioritizeTextures", [(GLsizei, "n"), (Pointer(Const(GLuint)), "textures"), (Pointer(Const(GLclampf)), "priorities")]),
    DllFunction(Void, "glTexSubImage1D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLsizei, "width"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]),
    DllFunction(Void, "glTexSubImage2D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]),
    DllFunction(Void, "glPopClientAttrib", []),
    DllFunction(Void, "glPushClientAttrib", [(GLbitfield, "mask")]),
    DllFunction(Void, "glBlendColor", [(GLclampf, "red"), (GLclampf, "green"), (GLclampf, "blue"), (GLclampf, "alpha")]),
    DllFunction(Void, "glBlendEquation", [(GLenum, "mode")]),
    DllFunction(Void, "glDrawRangeElements", [(GLenum, "mode"), (GLuint, "start"), (GLuint, "end"), (GLsizei, "count"), (GLenum, "type"), (Pointer(Const(GLvoid)), "indices")]),
    DllFunction(Void, "glColorTable", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "table")]),
    DllFunction(Void, "glColorTableParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
    DllFunction(Void, "glColorTableParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
    DllFunction(Void, "glCopyColorTable", [(GLenum, "target"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]),
    DllFunction(Void, "glGetColorTable", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), (Pointer(GLvoid), "table")]),
    DllFunction(Void, "glGetColorTableParameterfv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
    DllFunction(Void, "glGetColorTableParameteriv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    DllFunction(Void, "glColorSubTable", [(GLenum, "target"), (GLsizei, "start"), (GLsizei, "count"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "data")]),
    DllFunction(Void, "glCopyColorSubTable", [(GLenum, "target"), (GLsizei, "start"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]),
    DllFunction(Void, "glConvolutionFilter1D", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "image")]),
    DllFunction(Void, "glConvolutionFilter2D", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "image")]),
    DllFunction(Void, "glConvolutionParameterf", [(GLenum, "target"), (GLenum, "pname"), (GLfloat, "params")]),
    DllFunction(Void, "glConvolutionParameterfv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
    DllFunction(Void, "glConvolutionParameteri", [(GLenum, "target"), (GLenum, "pname"), (GLint, "params")]),
    DllFunction(Void, "glConvolutionParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
    DllFunction(Void, "glCopyConvolutionFilter1D", [(GLenum, "target"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width")]),
    DllFunction(Void, "glCopyConvolutionFilter2D", [(GLenum, "target"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
    DllFunction(Void, "glGetConvolutionFilter", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), (Pointer(GLvoid), "image")]),
    DllFunction(Void, "glGetConvolutionParameterfv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
    DllFunction(Void, "glGetConvolutionParameteriv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    DllFunction(Void, "glGetSeparableFilter", [(GLenum, "target"), (GLenum, "format"), (GLenum, "type"), (Pointer(GLvoid), "row"), (Pointer(GLvoid), "column"), (Pointer(GLvoid), "span")]),
    DllFunction(Void, "glSeparableFilter2D", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "row"), (Pointer(Const(GLvoid)), "column")]),
    DllFunction(Void, "glGetHistogram", [(GLenum, "target"), (GLboolean, "reset"), (GLenum, "format"), (GLenum, "type"), (Pointer(GLvoid), "values")]),
    DllFunction(Void, "glGetHistogramParameterfv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
    DllFunction(Void, "glGetHistogramParameteriv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    DllFunction(Void, "glGetMinmax", [(GLenum, "target"), (GLboolean, "reset"), (GLenum, "format"), (GLenum, "type"), (Pointer(GLvoid), "values")]),
    DllFunction(Void, "glGetMinmaxParameterfv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
    DllFunction(Void, "glGetMinmaxParameteriv", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    DllFunction(Void, "glHistogram", [(GLenum, "target"), (GLsizei, "width"), (GLenum, "internalformat"), (GLboolean, "sink")]),
    DllFunction(Void, "glMinmax", [(GLenum, "target"), (GLenum, "internalformat"), (GLboolean, "sink")]),
    DllFunction(Void, "glResetHistogram", [(GLenum, "target")]),
    DllFunction(Void, "glResetMinmax", [(GLenum, "target")]),
    DllFunction(Void, "glTexImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]),
    DllFunction(Void, "glTexSubImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLenum, "format"), (GLenum, "type"), (Pointer(Const(GLvoid)), "pixels")]),
    DllFunction(Void, "glCopyTexSubImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]),
    DllFunction(Void, "glActiveTextureARB", [(GLenum, "texture")]),
    DllFunction(Void, "glClientActiveTextureARB", [(GLenum, "texture")]),
    DllFunction(Void, "glMultiTexCoord1dARB", [(GLenum, "target"), (GLdouble, "s")]),
    DllFunction(Void, "glMultiTexCoord1dvARB", [(GLenum, "target"), (Array(Const(GLdouble), "1"), "v")]),
    DllFunction(Void, "glMultiTexCoord1fARB", [(GLenum, "target"), (GLfloat, "s")]),
    DllFunction(Void, "glMultiTexCoord1fvARB", [(GLenum, "target"), (Array(Const(GLfloat), "1"), "v")]),
    DllFunction(Void, "glMultiTexCoord1iARB", [(GLenum, "target"), (GLint, "s")]),
    DllFunction(Void, "glMultiTexCoord1ivARB", [(GLenum, "target"), (Array(Const(GLint), "1"), "v")]),
    DllFunction(Void, "glMultiTexCoord1sARB", [(GLenum, "target"), (GLshort, "s")]),
    DllFunction(Void, "glMultiTexCoord1svARB", [(GLenum, "target"), (Array(Const(GLshort), "1"), "v")]),
    DllFunction(Void, "glMultiTexCoord2dARB", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t")]),
    DllFunction(Void, "glMultiTexCoord2dvARB", [(GLenum, "target"), (Array(Const(GLdouble), "2"), "v")]),
    DllFunction(Void, "glMultiTexCoord2fARB", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t")]),
    DllFunction(Void, "glMultiTexCoord2fvARB", [(GLenum, "target"), (Array(Const(GLfloat), "2"), "v")]),
    DllFunction(Void, "glMultiTexCoord2iARB", [(GLenum, "target"), (GLint, "s"), (GLint, "t")]),
    DllFunction(Void, "glMultiTexCoord2ivARB", [(GLenum, "target"), (Array(Const(GLint), "2"), "v")]),
    DllFunction(Void, "glMultiTexCoord2sARB", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t")]),
    DllFunction(Void, "glMultiTexCoord2svARB", [(GLenum, "target"), (Array(Const(GLshort), "2"), "v")]),
    DllFunction(Void, "glMultiTexCoord3dARB", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r")]),
    DllFunction(Void, "glMultiTexCoord3dvARB", [(GLenum, "target"), (Array(Const(GLdouble), "3"), "v")]),
    DllFunction(Void, "glMultiTexCoord3fARB", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r")]),
    DllFunction(Void, "glMultiTexCoord3fvARB", [(GLenum, "target"), (Array(Const(GLfloat), "3"), "v")]),
    DllFunction(Void, "glMultiTexCoord3iARB", [(GLenum, "target"), (GLint, "s"), (GLint, "t"), (GLint, "r")]),
    DllFunction(Void, "glMultiTexCoord3ivARB", [(GLenum, "target"), (Array(Const(GLint), "3"), "v")]),
    DllFunction(Void, "glMultiTexCoord3sARB", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t"), (GLshort, "r")]),
    DllFunction(Void, "glMultiTexCoord3svARB", [(GLenum, "target"), (Array(Const(GLshort), "3"), "v")]),
    DllFunction(Void, "glMultiTexCoord4dARB", [(GLenum, "target"), (GLdouble, "s"), (GLdouble, "t"), (GLdouble, "r"), (GLdouble, "q")]),
    DllFunction(Void, "glMultiTexCoord4dvARB", [(GLenum, "target"), (Array(Const(GLdouble), "4"), "v")]),
    DllFunction(Void, "glMultiTexCoord4fARB", [(GLenum, "target"), (GLfloat, "s"), (GLfloat, "t"), (GLfloat, "r"), (GLfloat, "q")]),
    DllFunction(Void, "glMultiTexCoord4fvARB", [(GLenum, "target"), (Array(Const(GLfloat), "4"), "v")]),
    DllFunction(Void, "glMultiTexCoord4iARB", [(GLenum, "target"), (GLint, "s"), (GLint, "t"), (GLint, "r"), (GLint, "q")]),
    DllFunction(Void, "glMultiTexCoord4ivARB", [(GLenum, "target"), (Array(Const(GLint), "4"), "v")]),
    DllFunction(Void, "glMultiTexCoord4sARB", [(GLenum, "target"), (GLshort, "s"), (GLshort, "t"), (GLshort, "r"), (GLshort, "q")]),
    DllFunction(Void, "glMultiTexCoord4svARB", [(GLenum, "target"), (Array(Const(GLshort), "4"), "v")]),
]

HGLRC = Alias("HGLRC", HANDLE)
PROC = Intrinsic("PROC", "%p")

PFD = Flags(DWORD, [
    "PFD_DOUBLEBUFFER",
    "PFD_STEREO",
    "PFD_DRAW_TO_WINDOW",
    "PFD_DRAW_TO_BITMAP",
    "PFD_SUPPORT_GDI",
    "PFD_SUPPORT_OPENGL",
    "PFD_GENERIC_FORMAT",
    "PFD_NEED_PALETTE",
    "PFD_NEED_SYSTEM_PALETTE",
    "PFD_SWAP_EXCHANGE",
    "PFD_SWAP_COPY",
    "PFD_SWAP_LAYER_BUFFERS",
    "PFD_GENERIC_ACCELERATED",
    "PFD_SUPPORT_DIRECTDRAW",
    "PFD_DEPTH_DONTCARE",
    "PFD_DOUBLEBUFFER_DONTCARE",
    "PFD_STEREO_DONTCARE",
])

PIXELFORMATDESCRIPTOR = Struct("PIXELFORMATDESCRIPTOR", [
    (WORD, "nSize"),
    (WORD, "nVersion"),
    (PFD, "dwFlags"),
    (BYTE, "iPixelType"),
    (BYTE, "cColorBits"),
    (BYTE, "cRedBits"),
    (BYTE, "cRedShift"),
    (BYTE, "cGreenBits"),
    (BYTE, "cGreenShift"),
    (BYTE, "cBlueBits"),
    (BYTE, "cBlueShift"),
    (BYTE, "cAlphaBits"),
    (BYTE, "cAlphaShift"),
    (BYTE, "cAccumBits"),
    (BYTE, "cAccumRedBits"),
    (BYTE, "cAccumGreenBits"),
    (BYTE, "cAccumBlueBits"),
    (BYTE, "cAccumAlphaBits"),
    (BYTE, "cDepthBits"),
    (BYTE, "cStencilBits"),
    (BYTE, "cAuxBuffers"),
    (BYTE, "iLayerType"),
    (BYTE, "bReserved"),
    (DWORD, "dwLayerMask"),
    (DWORD, "dwVisibleMask"),
    (DWORD, "dwDamageMask"),
])

POINTFLOAT = Struct("POINTFLOAT", [
    (FLOAT, "x"),
    (FLOAT, "y"),
])

GLYPHMETRICSFLOAT = Struct("GLYPHMETRICSFLOAT", [
    (FLOAT, "gmfBlackBoxX"),
    (FLOAT, "gmfBlackBoxY"),
    (POINTFLOAT, "gmfptGlyphOrigin"),
    (FLOAT, "gmfCellIncX"),
    (FLOAT, "gmfCellIncY"),
])
LPGLYPHMETRICSFLOAT = Pointer(GLYPHMETRICSFLOAT)

COLORREF = Alias("COLORREF", DWORD)


LAYERPLANEDESCRIPTOR = Struct("LAYERPLANEDESCRIPTOR", [
    (WORD, "nSize"),
    (WORD, "nVersion"),
    (DWORD, "dwFlags"),
    (BYTE, "iPixelType"),
    (BYTE, "cColorBits"),
    (BYTE, "cRedBits"),
    (BYTE, "cRedShift"),
    (BYTE, "cGreenBits"),
    (BYTE, "cGreenShift"),
    (BYTE, "cBlueBits"),
    (BYTE, "cBlueShift"),
    (BYTE, "cAlphaBits"),
    (BYTE, "cAlphaShift"),
    (BYTE, "cAccumBits"),
    (BYTE, "cAccumRedBits"),
    (BYTE, "cAccumGreenBits"),
    (BYTE, "cAccumBlueBits"),
    (BYTE, "cAccumAlphaBits"),
    (BYTE, "cDepthBits"),
    (BYTE, "cStencilBits"),
    (BYTE, "cAuxBuffers"),
    (BYTE, "iLayerPlane"),
    (BYTE, "bReserved"),
    (COLORREF, "crTransparent"),
])
LPLAYERPLANEDESCRIPTOR = Pointer(LAYERPLANEDESCRIPTOR)

WGLSWAP = Struct("WGLSWAP", [
   (HDC, "hdc"),
    (UINT, "uiFlags"),
])

opengl32.functions += [
    DllFunction(BOOL, "wglCopyContext", [(HGLRC, "hglrcSrc"), (HGLRC, "hglrcDst"), (UINT, "mask")]),
    DllFunction(HGLRC, "wglCreateContext", [(HDC, "hdc")]),
    DllFunction(HGLRC, "wglCreateLayerContext", [(HDC, "hdc"), (Int, "iLayerPlane")]),
    DllFunction(BOOL, "wglDeleteContext", [(HGLRC, "hglrc")]),
    DllFunction(HGLRC, "wglGetCurrentContext", []),
    DllFunction(HDC, "wglGetCurrentDC", []),
    DllFunction(PROC, "wglGetDefaultProcAddress", [(LPCSTR, "lpszProc")]),
    DllFunction(Int, "wglChoosePixelFormat", [(HDC, "hdc"), (Pointer(Const(PIXELFORMATDESCRIPTOR)), "ppfd")]), 
    DllFunction(Int, "wglDescribePixelFormat", [(HDC, "hdc"), (Int, "iPixelFormat"), (UINT, "nBytes"), (OutPointer(PIXELFORMATDESCRIPTOR), "ppfd")]),
    DllFunction(Int, "wglGetPixelFormat", [(HDC, "hdc")]),
    DllFunction(BOOL, "wglSetPixelFormat", [(HDC, "hdc"), (Int, "iPixelFormat"), (Pointer(Const(PIXELFORMATDESCRIPTOR)), "ppfd")]),
    DllFunction(BOOL, "wglMakeCurrent", [(HDC, "hdc"), (HGLRC, "hglrc")]),
    DllFunction(BOOL, "wglShareLists", [(HGLRC, "hglrc1"), (HGLRC, "hglrc2")]),
    DllFunction(BOOL, "wglUseFontBitmapsA", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase")]),
    DllFunction(BOOL, "wglUseFontBitmapsW", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase")]),
    DllFunction(BOOL, "wglSwapBuffers", [(HDC, "hdc")]),
    DllFunction(BOOL, "wglUseFontOutlinesA", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase"), (FLOAT, "deviation"), (FLOAT, "extrusion"), (Int, "format"), (LPGLYPHMETRICSFLOAT, "lpgmf")]),
    DllFunction(BOOL, "wglUseFontOutlinesW", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase"), (FLOAT, "deviation"), (FLOAT, "extrusion"), (Int, "format"), (LPGLYPHMETRICSFLOAT, "lpgmf")]),
    DllFunction(BOOL , "wglDescribeLayerPlane", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nBytes"), (OutPointer(LAYERPLANEDESCRIPTOR), "plpd")]),
    DllFunction(Int  , "wglSetLayerPaletteEntries", [(HDC, "hdc"), (Int, "iLayerPlane"), (Int, "iStart"), (Int, "cEntries"), (Pointer(Const(COLORREF)), "pcr")]),
    DllFunction(Int  , "wglGetLayerPaletteEntries", [(HDC, "hdc"), (Int, "iLayerPlane"), (Int, "iStart"), (Int, "cEntries"), (OutPointer(COLORREF), "pcr")]),
    DllFunction(BOOL , "wglRealizeLayerPalette", [(HDC, "hdc"), (Int, "iLayerPlane"), (BOOL, "bRealize")]),
    DllFunction(BOOL , "wglSwapLayerBuffers", [(HDC, "hdc"), (UINT, "fuPlanes")]),
    DllFunction(DWORD, "wglSwapMultipleBuffers", [(UINT, "n"), (Pointer(Const(WGLSWAP)), "ps")]),
]


class WglGetProcAddressFunction(DllFunction):

    def __init__(self, type, name, args):
        DllFunction.__init__(self, type, name, args)
        self.functions = []

    def wrap_decl(self):
        for function in self.functions:
            function.wrap_decl()
        DllFunction.wrap_decl(self)

    def wrap_impl(self):
        for function in self.functions:
            function.wrap_impl()
        DllFunction.wrap_impl(self)

    def post_call_impl(self):
        print '    if(result) {'
        for function in self.functions:
            ptype = function.pointer_type()
            pvalue = function.pointer_value()
            print '        if(!strcmp("%s", lpszProc)) {' % function.name
            print '            %s = (%s)result;' % (pvalue, ptype)
            print '            result = (PROC)&%s;' % function.name;
            print '        }'
        print '    }'


wglgetprocaddress = WglGetProcAddressFunction(PROC, "wglGetProcAddress", [(LPCSTR, "lpszProc")])
opengl32.functions.append(wglgetprocaddress)

class WglFunction(Function):

    def get_true_pointer(self):
        ptype = self.pointer_type()
        pvalue = self.pointer_value()
        print '    if(!%s)' % (pvalue,)
        self.fail_impl()

attribute = FakeEnum(Int, [
    "WGL_NUMBER_PIXEL_FORMATS_EXT",
    "WGL_DRAW_TO_WINDOW_EXT",
    "WGL_DRAW_TO_BITMAP_EXT",
    "WGL_ACCELERATION_EXT",
    "WGL_NEED_PALETTE_EXT",
    "WGL_NEED_SYSTEM_PALETTE_EXT",
    "WGL_SWAP_LAYER_BUFFERS_EXT",
    "WGL_SWAP_METHOD_EXT",
    "WGL_NUMBER_OVERLAYS_EXT",
    "WGL_NUMBER_UNDERLAYS_EXT",
    "WGL_TRANSPARENT_EXT",
    "WGL_TRANSPARENT_VALUE_EXT",
    "WGL_SHARE_DEPTH_EXT",
    "WGL_SHARE_STENCIL_EXT",
    "WGL_SHARE_ACCUM_EXT",
    "WGL_SUPPORT_GDI_EXT",
    "WGL_SUPPORT_OPENGL_EXT",
    "WGL_DOUBLE_BUFFER_EXT",
    "WGL_STEREO_EXT",
    "WGL_PIXEL_TYPE_EXT",
    "WGL_COLOR_BITS_EXT",
    "WGL_RED_BITS_EXT",
    "WGL_RED_SHIFT_EXT",
    "WGL_GREEN_BITS_EXT",
    "WGL_GREEN_SHIFT_EXT",
    "WGL_BLUE_BITS_EXT",
    "WGL_BLUE_SHIFT_EXT",
    "WGL_ALPHA_BITS_EXT",
    "WGL_ALPHA_SHIFT_EXT",
    "WGL_ACCUM_BITS_EXT",
    "WGL_ACCUM_RED_BITS_EXT",
    "WGL_ACCUM_GREEN_BITS_EXT",
    "WGL_ACCUM_BLUE_BITS_EXT",
    "WGL_ACCUM_ALPHA_BITS_EXT",
    "WGL_DEPTH_BITS_EXT",
    "WGL_STENCIL_BITS_EXT",
    "WGL_AUX_BUFFERS_EXT",
    "WGL_NO_ACCELERATION_EXT",
    "WGL_GENERIC_ACCELERATION_EXT",
    "WGL_FULL_ACCELERATION_EXT",
    "WGL_SWAP_EXCHANGE_EXT",
    "WGL_SWAP_COPY_EXT",
    "WGL_SWAP_UNDEFINED_EXT",
    "WGL_TYPE_RGBA_EXT",
    "WGL_TYPE_COLORINDEX_EXT",
])

HPBUFFERARB = Alias("HPBUFFERARB", HANDLE)

wglgetprocaddress.functions += [
    WglFunction(Void, "glAttachShader", [(GLuint, "program"), (GLuint, "shader")]),
    WglFunction(GLuint, "glCreateProgram", []),
    WglFunction(GLuint, "glCreateShader", [(GLenum, "type")]),
    WglFunction(Void, "glDeleteProgram", [(GLuint, "program")]),
    WglFunction(Void, "glDeleteShader", [(GLuint, "program")]),
    WglFunction(Void, "glDetachShader", [(GLuint, "program"), (GLuint, "shader")]),
    WglFunction(Void, "glGetAttachedShaders", [(GLuint, "program"), (GLsizei, "maxCount"), (OutPointer(GLsizei), "count"), (Pointer(GLuint), "obj")]),
    WglFunction(Void, "glGetProgramInfoLog", [(GLuint, "program"), (GLsizei, "bufSize"), (OutPointer(GLsizei), "length"), (Out(GLstring), "infoLog")]),
    WglFunction(Void, "glGetProgramiv", [(GLuint, "program"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    WglFunction(Void, "glGetShaderInfoLog", [(GLuint, "shader"), (GLsizei, "bufSize"), (OutPointer(GLsizei), "length"), (Out(GLstring), "infoLog")]),
    WglFunction(Void, "glGetShaderiv", [(GLuint, "shader"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    WglFunction(GLboolean, "glIsProgram", [(GLuint, "program")]),
    WglFunction(GLboolean, "glIsShader", [(GLuint, "shader")]),
    WglFunction(Void, "glStencilFuncSeparate", [(GLenum, "face"), (GLenum, "func"), (GLint, "ref"), (GLuint, "mask")]),
    WglFunction(Void, "glStencilMaskSeparate", [(GLenum, "face"), (GLuint, "mask")]),
    WglFunction(Void, "glStencilOpSeparate", [(GLenum, "face"), (GLenum, "sfail"), (GLenum, "zfail"), (GLenum, "zpass")]),
    WglFunction(Void, "glStencilOpSeparateATI", [(GLenum, "face"), (GLenum, "sfail"), (GLenum, "zfail"), (GLenum, "zpass")]),
    WglFunction(Void, "glUniformMatrix2x3fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniformMatrix2x4fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniformMatrix3x2fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniformMatrix3x4fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniformMatrix4x2fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniformMatrix4x3fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glLoadTransposeMatrixd", [(Pointer(Const(GLdouble)), "m")]),
    WglFunction(Void, "glLoadTransposeMatrixdARB", [(Pointer(Const(GLdouble)), "m")]),
    WglFunction(Void, "glLoadTransposeMatrixf", [(Pointer(Const(GLfloat)), "m")]),
    WglFunction(Void, "glLoadTransposeMatrixfARB", [(Pointer(Const(GLfloat)), "m")]),
    WglFunction(Void, "glMultTransposeMatrixd", [(Pointer(Const(GLdouble)), "m")]),
    WglFunction(Void, "glMultTransposeMatrixdARB", [(Pointer(Const(GLdouble)), "m")]),
    WglFunction(Void, "glMultTransposeMatrixf", [(Pointer(Const(GLfloat)), "m")]),
    WglFunction(Void, "glMultTransposeMatrixfARB", [(Pointer(Const(GLfloat)), "m")]),
    WglFunction(Void, "glSampleCoverage", [(GLclampf, "value"), (GLboolean, "invert")]),
    WglFunction(Void, "glSampleCoverageARB", [(GLclampf, "value"), (GLboolean, "invert")]),
    WglFunction(Void, "glCompressedTexImage1D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLint, "border"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
    WglFunction(Void, "glCompressedTexImage1DARB", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLint, "border"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
    WglFunction(Void, "glCompressedTexImage2D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLint, "border"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
    WglFunction(Void, "glCompressedTexImage2DARB", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLint, "border"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
    WglFunction(Void, "glCompressedTexImage3D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLint, "border"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
    WglFunction(Void, "glCompressedTexImage3DARB", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLint, "border"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
    WglFunction(Void, "glCompressedTexSubImage1D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLsizei, "width"), (GLenum, "format"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
    WglFunction(Void, "glCompressedTexSubImage1DARB", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLsizei, "width"), (GLenum, "format"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
    WglFunction(Void, "glCompressedTexSubImage2D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
    WglFunction(Void, "glCompressedTexSubImage2DARB", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
    WglFunction(Void, "glCompressedTexSubImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLenum, "format"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
    WglFunction(Void, "glCompressedTexSubImage3DARB", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLenum, "format"), (GLsizei, "imageSize"), (Pointer(Const(GLvoid)), "data")]),
    WglFunction(Void, "glGetCompressedTexImage", [(GLenum, "target"), (GLint, "level"), (Pointer(GLvoid), "img")]),
    WglFunction(Void, "glGetCompressedTexImageARB", [(GLenum, "target"), (GLint, "level"), (Pointer(GLvoid), "img")]),
    WglFunction(Void, "glDisableVertexAttribArray", [(GLuint, "index")]),
    WglFunction(Void, "glDisableVertexAttribArrayARB", [(GLuint, "index")]),
    WglFunction(Void, "glEnableVertexAttribArray", [(GLuint, "index")]),
    WglFunction(Void, "glEnableVertexAttribArrayARB", [(GLuint, "index")]),
    WglFunction(Void, "glGetProgramEnvParameterdvARB", [(GLenum, "target"), (GLuint, "index"), (Array(GLdouble, "4"), "params")]),
    WglFunction(Void, "glGetProgramEnvParameterfvARB", [(GLenum, "target"), (GLuint, "index"), (Array(GLfloat, "4"), "params")]),
    WglFunction(Void, "glGetProgramLocalParameterdvARB", [(GLenum, "target"), (GLuint, "index"), (Array(GLdouble, "4"), "params")]),
    WglFunction(Void, "glGetProgramLocalParameterfvARB", [(GLenum, "target"), (GLuint, "index"), (Array(GLfloat, "4"), "params")]),
    WglFunction(Void, "glGetProgramStringARB", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLvoid), "string")]),
    WglFunction(Void, "glGetProgramivARB", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    WglFunction(Void, "glGetVertexAttribdv", [(GLuint, "index"), (GLenum, "pname"), (OutPointer(GLdouble), "params")]),
    WglFunction(Void, "glGetVertexAttribdvARB", [(GLuint, "index"), (GLenum, "pname"), (OutPointer(GLdouble), "params")]),
    WglFunction(Void, "glGetVertexAttribfv", [(GLuint, "index"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
    WglFunction(Void, "glGetVertexAttribfvARB", [(GLuint, "index"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]),
    WglFunction(Void, "glGetVertexAttribiv", [(GLuint, "index"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    WglFunction(Void, "glGetVertexAttribivARB", [(GLuint, "index"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    WglFunction(Void, "glProgramEnvParameter4dARB", [(GLenum, "target"), (GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
    WglFunction(Void, "glProgramParameter4dNV", [(GLenum, "target"), (GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
    WglFunction(Void, "glProgramEnvParameter4dvARB", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLdouble), "4"), "params")]),
    WglFunction(Void, "glProgramParameter4dvNV", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLdouble), "4"), "params")]),
    WglFunction(Void, "glProgramEnvParameter4fARB", [(GLenum, "target"), (GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
    WglFunction(Void, "glProgramParameter4fNV", [(GLenum, "target"), (GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
    WglFunction(Void, "glProgramEnvParameter4fvARB", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLfloat), "4"), "params")]),
    WglFunction(Void, "glProgramParameter4fvNV", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLfloat), "4"), "params")]),
    WglFunction(Void, "glProgramLocalParameter4dARB", [(GLenum, "target"), (GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
    WglFunction(Void, "glProgramLocalParameter4dvARB", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLdouble), "4"), "params")]),
    WglFunction(Void, "glProgramLocalParameter4fARB", [(GLenum, "target"), (GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
    WglFunction(Void, "glProgramLocalParameter4fvARB", [(GLenum, "target"), (GLuint, "index"), (Array(Const(GLfloat), "4"), "params")]),
    WglFunction(Void, "glProgramStringARB", [(GLenum, "target"), (GLenum, "format"), (GLsizei, "len"), (Pointer(Const(GLvoid)), "string")]),
    WglFunction(Void, "glVertexAttrib1d", [(GLuint, "index"), (GLdouble, "x")]),
    WglFunction(Void, "glVertexAttrib1dARB", [(GLuint, "index"), (GLdouble, "x")]),
    WglFunction(Void, "glVertexAttrib1dv", [(GLuint, "index"), (Array(Const(GLdouble), "1"), "v")]),
    WglFunction(Void, "glVertexAttrib1dvARB", [(GLuint, "index"), (Array(Const(GLdouble), "1"), "v")]),
    WglFunction(Void, "glVertexAttrib1f", [(GLuint, "index"), (GLfloat, "x")]),
    WglFunction(Void, "glVertexAttrib1fARB", [(GLuint, "index"), (GLfloat, "x")]),
    WglFunction(Void, "glVertexAttrib1fv", [(GLuint, "index"), (Array(Const(GLfloat), "1"), "v")]),
    WglFunction(Void, "glVertexAttrib1fvARB", [(GLuint, "index"), (Array(Const(GLfloat), "1"), "v")]),
    WglFunction(Void, "glVertexAttrib1s", [(GLuint, "index"), (GLshort, "x")]),
    WglFunction(Void, "glVertexAttrib1sARB", [(GLuint, "index"), (GLshort, "x")]),
    WglFunction(Void, "glVertexAttrib1sv", [(GLuint, "index"), (Array(Const(GLshort), "1"), "v")]),
    WglFunction(Void, "glVertexAttrib1svARB", [(GLuint, "index"), (Array(Const(GLshort), "1"), "v")]),
    WglFunction(Void, "glVertexAttrib2d", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y")]),
    WglFunction(Void, "glVertexAttrib2dARB", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y")]),
    WglFunction(Void, "glVertexAttrib2dv", [(GLuint, "index"), (Array(Const(GLdouble), "2"), "v")]),
    WglFunction(Void, "glVertexAttrib2dvARB", [(GLuint, "index"), (Array(Const(GLdouble), "2"), "v")]),
    WglFunction(Void, "glVertexAttrib2f", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y")]),
    WglFunction(Void, "glVertexAttrib2fARB", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y")]),
    WglFunction(Void, "glVertexAttrib2fv", [(GLuint, "index"), (Array(Const(GLfloat), "2"), "v")]),
    WglFunction(Void, "glVertexAttrib2fvARB", [(GLuint, "index"), (Array(Const(GLfloat), "2"), "v")]),
    WglFunction(Void, "glVertexAttrib2s", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y")]),
    WglFunction(Void, "glVertexAttrib2sARB", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y")]),
    WglFunction(Void, "glVertexAttrib2sv", [(GLuint, "index"), (Array(Const(GLshort), "2"), "v")]),
    WglFunction(Void, "glVertexAttrib2svARB", [(GLuint, "index"), (Array(Const(GLshort), "2"), "v")]),
    WglFunction(Void, "glVertexAttrib3d", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
    WglFunction(Void, "glVertexAttrib3dARB", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
    WglFunction(Void, "glVertexAttrib3dv", [(GLuint, "index"), (Array(Const(GLdouble), "3"), "v")]),
    WglFunction(Void, "glVertexAttrib3dvARB", [(GLuint, "index"), (Array(Const(GLdouble), "3"), "v")]),
    WglFunction(Void, "glVertexAttrib3f", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
    WglFunction(Void, "glVertexAttrib3fARB", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
    WglFunction(Void, "glVertexAttrib3fv", [(GLuint, "index"), (Array(Const(GLfloat), "3"), "v")]),
    WglFunction(Void, "glVertexAttrib3fvARB", [(GLuint, "index"), (Array(Const(GLfloat), "3"), "v")]),
    WglFunction(Void, "glVertexAttrib3s", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
    WglFunction(Void, "glVertexAttrib3sARB", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
    WglFunction(Void, "glVertexAttrib3sv", [(GLuint, "index"), (Array(Const(GLshort), "3"), "v")]),
    WglFunction(Void, "glVertexAttrib3svARB", [(GLuint, "index"), (Array(Const(GLshort), "3"), "v")]),
    WglFunction(Void, "glVertexAttrib4Nbv", [(GLuint, "index"), (Array(Const(GLbyte), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4NbvARB", [(GLuint, "index"), (Array(Const(GLbyte), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4Niv", [(GLuint, "index"), (Array(Const(GLint), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4NivARB", [(GLuint, "index"), (Array(Const(GLint), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4Nsv", [(GLuint, "index"), (Array(Const(GLshort), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4NsvARB", [(GLuint, "index"), (Array(Const(GLshort), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4Nub", [(GLuint, "index"), (GLubyte, "x"), (GLubyte, "y"), (GLubyte, "z"), (GLubyte, "w")]),
    WglFunction(Void, "glVertexAttrib4NubARB", [(GLuint, "index"), (GLubyte, "x"), (GLubyte, "y"), (GLubyte, "z"), (GLubyte, "w")]),
    WglFunction(Void, "glVertexAttrib4Nubv", [(GLuint, "index"), (Array(Const(GLubyte), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4NubvARB", [(GLuint, "index"), (Array(Const(GLubyte), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4Nuiv", [(GLuint, "index"), (Array(Const(GLuint), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4NuivARB", [(GLuint, "index"), (Array(Const(GLuint), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4Nusv", [(GLuint, "index"), (Array(Const(GLushort), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4NusvARB", [(GLuint, "index"), (Array(Const(GLushort), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4bv", [(GLuint, "index"), (Array(Const(GLbyte), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4bvARB", [(GLuint, "index"), (Array(Const(GLbyte), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4d", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
    WglFunction(Void, "glVertexAttrib4dARB", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
    WglFunction(Void, "glVertexAttrib4dv", [(GLuint, "index"), (Array(Const(GLdouble), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4dvARB", [(GLuint, "index"), (Array(Const(GLdouble), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4f", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
    WglFunction(Void, "glVertexAttrib4fARB", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
    WglFunction(Void, "glVertexAttrib4fv", [(GLuint, "index"), (Array(Const(GLfloat), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4fvARB", [(GLuint, "index"), (Array(Const(GLfloat), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4iv", [(GLuint, "index"), (Array(Const(GLint), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4ivARB", [(GLuint, "index"), (Array(Const(GLint), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4s", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
    WglFunction(Void, "glVertexAttrib4sARB", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
    WglFunction(Void, "glVertexAttrib4sv", [(GLuint, "index"), (Array(Const(GLshort), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4svARB", [(GLuint, "index"), (Array(Const(GLshort), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4ubv", [(GLuint, "index"), (Array(Const(GLubyte), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4ubvARB", [(GLuint, "index"), (Array(Const(GLubyte), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4uiv", [(GLuint, "index"), (Array(Const(GLuint), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4uivARB", [(GLuint, "index"), (Array(Const(GLuint), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4usv", [(GLuint, "index"), (Array(Const(GLushort), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4usvARB", [(GLuint, "index"), (Array(Const(GLushort), "4"), "v")]),
    WglFunction(Void, "glVertexAttribPointer", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLboolean, "normalized"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
    WglFunction(Void, "glVertexAttribPointerARB", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLboolean, "normalized"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
    WglFunction(Void, "glBindBufferARB", [(GLenum, "target"), (GLuint, "buffer")]),
    WglFunction(Void, "glBufferDataARB", [(GLenum, "target"), (GLsizeiptrARB, "size"), (Pointer(Const(GLvoid)), "data"), (GLenum, "usage")]),
    WglFunction(Void, "glBufferSubDataARB", [(GLenum, "target"), (GLintptrARB, "offset"), (GLsizeiptrARB, "size"), (Pointer(Const(GLvoid)), "data")]),
    WglFunction(Void, "glDeleteBuffersARB", [(GLsizei, "n"), (Pointer(Const(GLuint)), "buffer")]),
    WglFunction(Void, "glGenBuffersARB", [(GLsizei, "n"), (Pointer(GLuint), "buffer")]),
    WglFunction(Void, "glGetBufferParameterivARB", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLint), "params")]),
    WglFunction(Void, "glGetBufferPointervARB", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Pointer(GLvoid)), "params")]),
    WglFunction(Void, "glGetBufferSubDataARB", [(GLenum, "target"), (GLintptrARB, "offset"), (GLsizeiptrARB, "size"), (Pointer(GLvoid), "data")]),
    WglFunction(GLboolean, "glIsBufferARB", [(GLuint, "buffer")]),
    WglFunction(Pointer(GLvoid), "glMapBufferARB", [(GLenum, "target"), (GLenum, "access")]),
    WglFunction(GLboolean, "glUnmapBufferARB", [(GLenum, "target")]),
    WglFunction(Void, "glBeginQueryARB", [(GLenum, "target"), (GLuint, "id")]),
    WglFunction(Void, "glDeleteQueriesARB", [(GLsizei, "n"), (Pointer(Const(GLuint)), "ids")]),
    WglFunction(Void, "glEndQueryARB", [(GLenum, "target")]),
    WglFunction(Void, "glGenQueriesARB", [(GLsizei, "n"), (Pointer(GLuint), "ids")]),
    WglFunction(Void, "glGetQueryObjectivARB", [(GLuint, "id"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    WglFunction(Void, "glGetQueryObjectuivARB", [(GLuint, "id"), (GLenum, "pname"), (OutPointer(GLuint), "params")]),
    WglFunction(Void, "glGetQueryivARB", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]),
    WglFunction(GLboolean, "glIsQueryARB", [(GLuint, "id")]),
    WglFunction(Void, "glAttachObjectARB", [(GLhandleARB, "containerObj"), (GLhandleARB, "obj")]),
    WglFunction(Void, "glCompileShader", [(GLhandleARB, "shader")]),
    WglFunction(Void, "glCompileShaderARB", [(GLhandleARB, "shader")]),
    WglFunction(GLhandleARB, "glCreateProgramObjectARB", []),
    WglFunction(GLhandleARB, "glCreateShaderObjectARB", [(GLenum, "shaderType")]),
    WglFunction(Void, "glDeleteObjectARB", [(GLhandleARB, "obj")]),
    WglFunction(Void, "glDetachObjectARB", [(GLhandleARB, "containerObj"), (GLhandleARB, "attachedObj")]),
    WglFunction(Void, "glGetActiveUniform", [(GLhandleARB, "program"), (GLuint, "index"), (GLsizei, "bufSize"), (Pointer(GLsizei), "length"), (Pointer(GLint), "size"), (Pointer(GLenum), "type"), (Pointer(GLcharARB), "name")]),
    WglFunction(Void, "glGetActiveUniformARB", [(GLhandleARB, "program"), (GLuint, "index"), (GLsizei, "bufSize"), (Pointer(GLsizei), "length"), (Pointer(GLint), "size"), (Pointer(GLenum), "type"), (Pointer(GLcharARB), "name")]),
    WglFunction(Void, "glGetAttachedObjectsARB", [(GLhandleARB, "containerObj"), (GLsizei, "maxLength"), (Pointer(GLsizei), "length"), (Pointer(GLhandleARB), "infoLog")]),
    WglFunction(GLhandleARB, "glGetHandleARB", [(GLenum, "pname")]),
    WglFunction(Void, "glGetInfoLogARB", [(GLhandleARB, "obj"), (GLsizei, "maxLength"), (OutPointer(GLsizei), "length"), (Out(GLstringARB), "infoLog")]),
    WglFunction(Void, "glGetObjectParameterfvARB", [(GLhandleARB, "obj"), (GLenum, "pname"), (Pointer(GLfloat), "params")]),
    WglFunction(Void, "glGetObjectParameterivARB", [(GLhandleARB, "obj"), (GLenum, "pname"), (Pointer(GLint), "params")]),
    WglFunction(Void, "glGetShaderSource", [(GLhandleARB, "shader"), (GLsizei, "bufSize"), (Pointer(GLsizei), "length"), (Out(GLstringARB), "source")]),
    WglFunction(Void, "glGetShaderSourceARB", [(GLhandleARB, "shader"), (GLsizei, "bufSize"), (Pointer(GLsizei), "length"), (Out(GLstringARB), "source")]),
    WglFunction(GLint, "glGetUniformLocation", [(GLhandleARB, "program"), (Pointer(Const(GLcharARB)), "name")]),
    WglFunction(GLint, "glGetUniformLocationARB", [(GLhandleARB, "program"), (Pointer(Const(GLcharARB)), "name")]),
    WglFunction(Void, "glGetUniformfv", [(GLhandleARB, "program"), (GLint, "location"), (Pointer(GLfloat), "params")]),
    WglFunction(Void, "glGetUniformfvARB", [(GLhandleARB, "program"), (GLint, "location"), (Pointer(GLfloat), "params")]),
    WglFunction(Void, "glGetUniformiv", [(GLhandleARB, "program"), (GLint, "location"), (Pointer(GLint), "params")]),
    WglFunction(Void, "glGetUniformivARB", [(GLhandleARB, "program"), (GLint, "location"), (Pointer(GLint), "params")]),
    WglFunction(Void, "glLinkProgram", [(GLhandleARB, "program")]),
    WglFunction(Void, "glLinkProgramARB", [(GLhandleARB, "program")]),
    WglFunction(Void, "glShaderSource", [(GLhandleARB, "shader"), (GLsizei, "count"), (Array(Const(GLstringARB), "count"), "string"), (Pointer(Const(GLint)), "length")]),
    WglFunction(Void, "glShaderSourceARB", [(GLhandleARB, "shader"), (GLsizei, "count"), (Array(Const(GLstringARB), "count"), "string"), (Pointer(Const(GLint)), "length")]),
    WglFunction(Void, "glUniform1f", [(GLint, "location"), (GLfloat, "v0")]),
    WglFunction(Void, "glUniform1fARB", [(GLint, "location"), (GLfloat, "v0")]),
    WglFunction(Void, "glUniform1fv", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniform1fvARB", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniform1i", [(GLint, "location"), (GLint, "v0")]),
    WglFunction(Void, "glUniform1iARB", [(GLint, "location"), (GLint, "v0")]),
    WglFunction(Void, "glUniform1iv", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLint)), "value")]),
    WglFunction(Void, "glUniform1ivARB", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLint)), "value")]),
    WglFunction(Void, "glUniform2f", [(GLint, "location"), (GLfloat, "v0"), (GLfloat, "v1")]),
    WglFunction(Void, "glUniform2fARB", [(GLint, "location"), (GLfloat, "v0"), (GLfloat, "v1")]),
    WglFunction(Void, "glUniform2fv", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniform2fvARB", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniform2i", [(GLint, "location"), (GLint, "v0"), (GLint, "v1")]),
    WglFunction(Void, "glUniform2iARB", [(GLint, "location"), (GLint, "v0"), (GLint, "v1")]),
    WglFunction(Void, "glUniform2iv", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLint)), "value")]),
    WglFunction(Void, "glUniform2ivARB", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLint)), "value")]),
    WglFunction(Void, "glUniform3f", [(GLint, "location"), (GLfloat, "v0"), (GLfloat, "v1"), (GLfloat, "v2")]),
    WglFunction(Void, "glUniform3fARB", [(GLint, "location"), (GLfloat, "v0"), (GLfloat, "v1"), (GLfloat, "v2")]),
    WglFunction(Void, "glUniform3fv", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniform3fvARB", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniform3i", [(GLint, "location"), (GLint, "v0"), (GLint, "v1"), (GLint, "v2")]),
    WglFunction(Void, "glUniform3iARB", [(GLint, "location"), (GLint, "v0"), (GLint, "v1"), (GLint, "v2")]),
    WglFunction(Void, "glUniform3iv", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLint)), "value")]),
    WglFunction(Void, "glUniform3ivARB", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLint)), "value")]),
    WglFunction(Void, "glUniform4f", [(GLint, "location"), (GLfloat, "v0"), (GLfloat, "v1"), (GLfloat, "v2"), (GLfloat, "v3")]),
    WglFunction(Void, "glUniform4fARB", [(GLint, "location"), (GLfloat, "v0"), (GLfloat, "v1"), (GLfloat, "v2"), (GLfloat, "v3")]),
    WglFunction(Void, "glUniform4fv", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniform4fvARB", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniform4i", [(GLint, "location"), (GLint, "v0"), (GLint, "v1"), (GLint, "v2"), (GLint, "v3")]),
    WglFunction(Void, "glUniform4iARB", [(GLint, "location"), (GLint, "v0"), (GLint, "v1"), (GLint, "v2"), (GLint, "v3")]),
    WglFunction(Void, "glUniform4iv", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLint)), "value")]),
    WglFunction(Void, "glUniform4ivARB", [(GLint, "location"), (GLsizei, "count"), (Pointer(Const(GLint)), "value")]),
    WglFunction(Void, "glUniformMatrix2fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniformMatrix2fvARB", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniformMatrix3fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniformMatrix3fvARB", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniformMatrix4fv", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUniformMatrix4fvARB", [(GLint, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glUseProgram", [(GLhandleARB, "program")]),
    WglFunction(Void, "glUseProgramObjectARB", [(GLhandleARB, "program")]),
    WglFunction(Void, "glValidateProgram", [(GLhandleARB, "program")]),
    WglFunction(Void, "glValidateProgramARB", [(GLhandleARB, "program")]),
    WglFunction(Void, "glBindAttribLocation", [(GLhandleARB, "program"), (GLuint, "index"), (Pointer(Const(GLcharARB)), "name")]),
    WglFunction(Void, "glBindAttribLocationARB", [(GLhandleARB, "program"), (GLuint, "index"), (Pointer(Const(GLcharARB)), "name")]),
    WglFunction(Void, "glGetActiveAttrib", [(GLhandleARB, "program"), (GLuint, "index"), (GLsizei, "bufSize"), (Pointer(GLsizei), "length"), (Pointer(GLint), "size"), (Pointer(GLenum), "type"), (Pointer(GLcharARB), "name")]),
    WglFunction(Void, "glGetActiveAttribARB", [(GLhandleARB, "program"), (GLuint, "index"), (GLsizei, "bufSize"), (Pointer(GLsizei), "length"), (Pointer(GLint), "size"), (Pointer(GLenum), "type"), (Pointer(GLcharARB), "name")]),
    WglFunction(GLint, "glGetAttribLocation", [(GLhandleARB, "program"), (Pointer(Const(GLcharARB)), "name")]),
    WglFunction(GLint, "glGetAttribLocationARB", [(GLhandleARB, "program"), (Pointer(Const(GLcharARB)), "name")]),
    WglFunction(Void, "glDrawBuffers", [(GLsizei, "n"), (Pointer(Const(GLenum)), "bufs")]),
    WglFunction(Void, "glDrawBuffersARB", [(GLsizei, "n"), (Pointer(Const(GLenum)), "bufs")]),
    WglFunction(Void, "glDrawBuffersATI", [(GLsizei, "n"), (Pointer(Const(GLenum)), "bufs")]),
    WglFunction(Void, "glRenderbufferStorageMultisample", [(GLenum, "target"), (GLsizei, "samples"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height")]),
    WglFunction(Void, "glRenderbufferStorageMultisampleEXT", [(GLenum, "target"), (GLsizei, "samples"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height")]),
    WglFunction(Void, "glFlushMappedBufferRange", [(GLenum, "target"), (GLintptr, "offset"), (GLsizeiptr, "length")]),
    WglFunction(Pointer(GLvoid), "glMapBufferRange", [(GLenum, "target"), (GLintptr, "offset"), (GLsizeiptr, "length"), (GLbitfield, "access")]),
    WglFunction(Void, "glBindVertexArray", [(GLuint, "array")]),
    WglFunction(Void, "glGenVertexArrays", [(GLsizei, "n"), (Pointer(GLuint), "arrays")]),
    WglFunction(Void, "glCopyBufferSubData", [(GLenum, "readTarget"), (GLenum, "writeTarget"), (GLintptr, "readOffset"), (GLintptr, "writeOffset"), (GLsizeiptr, "size")]),
    #WglFunction(GLenum, "glClientWaitSync", [(GLsync, "sync"), (GLbitfield, "flags"), (GLuint64, "timeout")]),
    #WglFunction(Void, "glDeleteSync", [(GLsync, "sync")]),
    #WglFunction(GLsync, "glFenceSync", [(GLenum, "condition"), (GLbitfield, "flags")]),
    #WglFunction(Void, "glGetInteger64v", [(GLenum, "pname"), (Pointer(GLint64), "params")]),
    #WglFunction(Void, "glGetSynciv", [(GLsync, "sync"), (GLenum, "pname"), (GLsizei, "bufSize"), (Pointer(GLsizei), "length"), (Pointer(GLint), "values")]),
    #WglFunction(GLboolean, "glIsSync", [(GLsync, "sync")]),
    #WglFunction(Void, "glWaitSync", [(GLsync, "sync"), (GLbitfield, "flags"), (GLuint64, "timeout")]),
    WglFunction(Void, "glDrawElementsBaseVertex", [(GLenum, "mode"), (GLsizei, "count"), (GLenum, "type"), (Pointer(Const(GLvoid)), "indices"), (GLint, "basevertex")]),
    WglFunction(Void, "glDrawRangeElementsBaseVertex", [(GLenum, "mode"), (GLuint, "start"), (GLuint, "end"), (GLsizei, "count"), (GLenum, "type"), (Pointer(Const(GLvoid)), "indices"), (GLint, "basevertex")]),
    WglFunction(Void, "glMultiDrawElementsBaseVertex", [(GLenum, "mode"), (Pointer(Const(GLsizei)), "count"), (GLenum, "type"), (Pointer(Pointer(Const(GLvoid))), "indices"), (GLsizei, "primcount"), (Pointer(Const(GLint)), "basevertex")]),
    WglFunction(Void, "glPolygonOffsetEXT", [(GLfloat, "factor"), (GLfloat, "bias")]),
    WglFunction(Void, "glGetPixelTexGenParameterfvSGIS", [(GLenum, "pname"), (Pointer(GLfloat), "params")]),
    WglFunction(Void, "glGetPixelTexGenParameterivSGIS", [(GLenum, "pname"), (Pointer(GLint), "params")]),
    WglFunction(Void, "glPixelTexGenParameterfSGIS", [(GLenum, "pname"), (GLfloat, "param")]),
    WglFunction(Void, "glPixelTexGenParameterfvSGIS", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
    WglFunction(Void, "glPixelTexGenParameteriSGIS", [(GLenum, "pname"), (GLint, "param")]),
    WglFunction(Void, "glPixelTexGenParameterivSGIS", [(GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
    WglFunction(Void, "glSampleMaskSGIS", [(GLclampf, "value"), (GLboolean, "invert")]),
    WglFunction(Void, "glSampleMaskEXT", [(GLclampf, "value"), (GLboolean, "invert")]),
    WglFunction(Void, "glSamplePatternSGIS", [(GLenum, "pattern")]),
    WglFunction(Void, "glSamplePatternEXT", [(GLenum, "pattern")]),
    WglFunction(Void, "glColorPointerEXT", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (Pointer(Const(GLvoid)), "pointer")]),
    WglFunction(Void, "glEdgeFlagPointerEXT", [(GLsizei, "stride"), (GLsizei, "count"), (Pointer(Const(GLboolean)), "pointer")]),
    WglFunction(Void, "glIndexPointerEXT", [(GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (Pointer(Const(GLvoid)), "pointer")]),
    WglFunction(Void, "glNormalPointerEXT", [(GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (Pointer(Const(GLvoid)), "pointer")]),
    WglFunction(Void, "glTexCoordPointerEXT", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (Pointer(Const(GLvoid)), "pointer")]),
    WglFunction(Void, "glVertexPointerEXT", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (GLsizei, "count"), (Pointer(Const(GLvoid)), "pointer")]),
    WglFunction(Void, "glPointParameterf", [(GLenum, "pname"), (GLfloat, "param")]),
    WglFunction(Void, "glPointParameterfARB", [(GLenum, "pname"), (GLfloat, "param")]),
    WglFunction(Void, "glPointParameterfEXT", [(GLenum, "pname"), (GLfloat, "param")]),
    WglFunction(Void, "glPointParameterfSGIS", [(GLenum, "pname"), (GLfloat, "param")]),
    WglFunction(Void, "glPointParameterfv", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
    WglFunction(Void, "glPointParameterfvARB", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
    WglFunction(Void, "glPointParameterfvEXT", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
    WglFunction(Void, "glPointParameterfvSGIS", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
    WglFunction(Void, "glLockArraysEXT", [(GLint, "first"), (GLsizei, "count")]),
    WglFunction(Void, "glUnlockArraysEXT", []),
    WglFunction(Void, "glCullParameterdvEXT", [(GLenum, "pname"), (Pointer(GLdouble), "params")]),
    WglFunction(Void, "glCullParameterfvEXT", [(GLenum, "pname"), (Pointer(GLfloat), "params")]),
    WglFunction(Void, "glSecondaryColor3b", [(GLbyte, "red"), (GLbyte, "green"), (GLbyte, "blue")]),
    WglFunction(Void, "glSecondaryColor3bEXT", [(GLbyte, "red"), (GLbyte, "green"), (GLbyte, "blue")]),
    WglFunction(Void, "glSecondaryColor3bv", [(Array(Const(GLbyte), "3"), "v")]),
    WglFunction(Void, "glSecondaryColor3bvEXT", [(Array(Const(GLbyte), "3"), "v")]),
    WglFunction(Void, "glSecondaryColor3d", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue")]),
    WglFunction(Void, "glSecondaryColor3dEXT", [(GLdouble, "red"), (GLdouble, "green"), (GLdouble, "blue")]),
    WglFunction(Void, "glSecondaryColor3dv", [(Array(Const(GLdouble), "3"), "v")]),
    WglFunction(Void, "glSecondaryColor3dvEXT", [(Array(Const(GLdouble), "3"), "v")]),
    WglFunction(Void, "glSecondaryColor3f", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue")]),
    WglFunction(Void, "glSecondaryColor3fEXT", [(GLfloat, "red"), (GLfloat, "green"), (GLfloat, "blue")]),
    WglFunction(Void, "glSecondaryColor3fv", [(Array(Const(GLfloat), "3"), "v")]),
    WglFunction(Void, "glSecondaryColor3fvEXT", [(Array(Const(GLfloat), "3"), "v")]),
    WglFunction(Void, "glSecondaryColor3i", [(GLint, "red"), (GLint, "green"), (GLint, "blue")]),
    WglFunction(Void, "glSecondaryColor3iEXT", [(GLint, "red"), (GLint, "green"), (GLint, "blue")]),
    WglFunction(Void, "glSecondaryColor3iv", [(Array(Const(GLint), "3"), "v")]),
    WglFunction(Void, "glSecondaryColor3ivEXT", [(Array(Const(GLint), "3"), "v")]),
    WglFunction(Void, "glSecondaryColor3s", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue")]),
    WglFunction(Void, "glSecondaryColor3sEXT", [(GLshort, "red"), (GLshort, "green"), (GLshort, "blue")]),
    WglFunction(Void, "glSecondaryColor3sv", [(Array(Const(GLshort), "3"), "v")]),
    WglFunction(Void, "glSecondaryColor3svEXT", [(Array(Const(GLshort), "3"), "v")]),
    WglFunction(Void, "glSecondaryColor3ub", [(GLubyte, "red"), (GLubyte, "green"), (GLubyte, "blue")]),
    WglFunction(Void, "glSecondaryColor3ubEXT", [(GLubyte, "red"), (GLubyte, "green"), (GLubyte, "blue")]),
    WglFunction(Void, "glSecondaryColor3ubv", [(Array(Const(GLubyte), "3"), "v")]),
    WglFunction(Void, "glSecondaryColor3ubvEXT", [(Array(Const(GLubyte), "3"), "v")]),
    WglFunction(Void, "glSecondaryColor3ui", [(GLuint, "red"), (GLuint, "green"), (GLuint, "blue")]),
    WglFunction(Void, "glSecondaryColor3uiEXT", [(GLuint, "red"), (GLuint, "green"), (GLuint, "blue")]),
    WglFunction(Void, "glSecondaryColor3uiv", [(Array(Const(GLuint), "3"), "v")]),
    WglFunction(Void, "glSecondaryColor3uivEXT", [(Array(Const(GLuint), "3"), "v")]),
    WglFunction(Void, "glSecondaryColor3us", [(GLushort, "red"), (GLushort, "green"), (GLushort, "blue")]),
    WglFunction(Void, "glSecondaryColor3usEXT", [(GLushort, "red"), (GLushort, "green"), (GLushort, "blue")]),
    WglFunction(Void, "glSecondaryColor3usv", [(Array(Const(GLushort), "3"), "v")]),
    WglFunction(Void, "glSecondaryColor3usvEXT", [(Array(Const(GLushort), "3"), "v")]),
    WglFunction(Void, "glSecondaryColorPointer", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
    WglFunction(Void, "glSecondaryColorPointerEXT", [(GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
    WglFunction(Void, "glMultiDrawArrays", [(GLenum, "mode"), (Pointer(GLint), "first"), (Pointer(GLsizei), "count"), (GLsizei, "primcount")]),
    WglFunction(Void, "glMultiDrawArraysEXT", [(GLenum, "mode"), (Pointer(GLint), "first"), (Pointer(GLsizei), "count"), (GLsizei, "primcount")]),
    WglFunction(Void, "glMultiDrawElements", [(GLenum, "mode"), (Pointer(Const(GLsizei)), "count"), (GLenum, "type"), (Pointer(Pointer(Const(GLvoid))), "indices"), (GLsizei, "primcount")]),
    WglFunction(Void, "glMultiDrawElementsEXT", [(GLenum, "mode"), (Pointer(Const(GLsizei)), "count"), (GLenum, "type"), (Pointer(Pointer(Const(GLvoid))), "indices"), (GLsizei, "primcount")]),
    WglFunction(Void, "glFogCoordPointer", [(GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
    WglFunction(Void, "glFogCoordPointerEXT", [(GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
    WglFunction(Void, "glFogCoordd", [(GLdouble, "coord")]),
    WglFunction(Void, "glFogCoorddEXT", [(GLdouble, "coord")]),
    WglFunction(Void, "glFogCoorddv", [(Array(Const(GLdouble), "1"), "coord")]),
    WglFunction(Void, "glFogCoorddvEXT", [(Array(Const(GLdouble), "1"), "coord")]),
    WglFunction(Void, "glFogCoordf", [(GLfloat, "coord")]),
    WglFunction(Void, "glFogCoordfEXT", [(GLfloat, "coord")]),
    WglFunction(Void, "glFogCoordfv", [(Array(Const(GLfloat), "1"), "coord")]),
    WglFunction(Void, "glFogCoordfvEXT", [(Array(Const(GLfloat), "1"), "coord")]),
    WglFunction(Void, "glPixelTexGenSGIX", [(GLenum, "mode")]),
    WglFunction(Void, "glBlendFuncSeparate", [(GLenum, "sfactorRGB"), (GLenum, "dfactorRGB"), (GLenum, "sfactorAlpha"), (GLenum, "dfactorAlpha")]),
    WglFunction(Void, "glBlendFuncSeparateEXT", [(GLenum, "sfactorRGB"), (GLenum, "dfactorRGB"), (GLenum, "sfactorAlpha"), (GLenum, "dfactorAlpha")]),
    WglFunction(Void, "glBlendFuncSeparateINGR", [(GLenum, "sfactorRGB"), (GLenum, "dfactorRGB"), (GLenum, "sfactorAlpha"), (GLenum, "dfactorAlpha")]),
    WglFunction(Void, "glFlushVertexArrayRangeNV", []),
    WglFunction(Void, "glVertexArrayRangeNV", [(GLsizei, "length"), (Pointer(Const(GLvoid)), "pointer")]),
    WglFunction(Void, "glCombinerInputNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "variable"), (GLenum, "input"), (GLenum, "mapping"), (GLenum, "componentUsage")]),
    WglFunction(Void, "glCombinerOutputNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "abOutput"), (GLenum, "cdOutput"), (GLenum, "sumOutput"), (GLenum, "scale"), (GLenum, "bias"), (GLboolean, "abDotProduct"), (GLboolean, "cdDotProduct"), (GLboolean, "muxSum")]),
    WglFunction(Void, "glCombinerParameterfNV", [(GLenum, "pname"), (GLfloat, "param")]),
    WglFunction(Void, "glCombinerParameterfvNV", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "params")]),
    WglFunction(Void, "glCombinerParameteriNV", [(GLenum, "pname"), (GLint, "param")]),
    WglFunction(Void, "glCombinerParameterivNV", [(GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
    WglFunction(Void, "glFinalCombinerInputNV", [(GLenum, "variable"), (GLenum, "input"), (GLenum, "mapping"), (GLenum, "componentUsage")]),
    WglFunction(Void, "glGetCombinerInputParameterfvNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "variable"), (GLenum, "pname"), (Pointer(GLfloat), "params")]),
    WglFunction(Void, "glGetCombinerInputParameterivNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "variable"), (GLenum, "pname"), (Pointer(GLint), "params")]),
    WglFunction(Void, "glGetCombinerOutputParameterfvNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "pname"), (Pointer(GLfloat), "params")]),
    WglFunction(Void, "glGetCombinerOutputParameterivNV", [(GLenum, "stage"), (GLenum, "portion"), (GLenum, "pname"), (Pointer(GLint), "params")]),
    WglFunction(Void, "glGetFinalCombinerInputParameterfvNV", [(GLenum, "variable"), (GLenum, "pname"), (Pointer(GLfloat), "params")]),
    WglFunction(Void, "glGetFinalCombinerInputParameterivNV", [(GLenum, "variable"), (GLenum, "pname"), (Pointer(GLint), "params")]),
    WglFunction(Void, "glResizeBuffersMESA", []),
    WglFunction(Void, "glWindowPos2d", [(GLdouble, "x"), (GLdouble, "y")]),
    WglFunction(Void, "glWindowPos2dARB", [(GLdouble, "x"), (GLdouble, "y")]),
    WglFunction(Void, "glWindowPos2dMESA", [(GLdouble, "x"), (GLdouble, "y")]),
    WglFunction(Void, "glWindowPos2dv", [(Pointer(Const(GLdouble)), "v")]),
    WglFunction(Void, "glWindowPos2dvARB", [(Pointer(Const(GLdouble)), "v")]),
    WglFunction(Void, "glWindowPos2dvMESA", [(Pointer(Const(GLdouble)), "v")]),
    WglFunction(Void, "glWindowPos2f", [(GLfloat, "x"), (GLfloat, "y")]),
    WglFunction(Void, "glWindowPos2fARB", [(GLfloat, "x"), (GLfloat, "y")]),
    WglFunction(Void, "glWindowPos2fMESA", [(GLfloat, "x"), (GLfloat, "y")]),
    WglFunction(Void, "glWindowPos2fv", [(Pointer(Const(GLfloat)), "v")]),
    WglFunction(Void, "glWindowPos2fvARB", [(Pointer(Const(GLfloat)), "v")]),
    WglFunction(Void, "glWindowPos2fvMESA", [(Pointer(Const(GLfloat)), "v")]),
    WglFunction(Void, "glWindowPos2i", [(GLint, "x"), (GLint, "y")]),
    WglFunction(Void, "glWindowPos2iARB", [(GLint, "x"), (GLint, "y")]),
    WglFunction(Void, "glWindowPos2iMESA", [(GLint, "x"), (GLint, "y")]),
    WglFunction(Void, "glWindowPos2iv", [(Pointer(Const(GLint)), "v")]),
    WglFunction(Void, "glWindowPos2ivARB", [(Pointer(Const(GLint)), "v")]),
    WglFunction(Void, "glWindowPos2ivMESA", [(Pointer(Const(GLint)), "v")]),
    WglFunction(Void, "glWindowPos2s", [(GLshort, "x"), (GLshort, "y")]),
    WglFunction(Void, "glWindowPos2sARB", [(GLshort, "x"), (GLshort, "y")]),
    WglFunction(Void, "glWindowPos2sMESA", [(GLshort, "x"), (GLshort, "y")]),
    WglFunction(Void, "glWindowPos2sv", [(Pointer(Const(GLshort)), "v")]),
    WglFunction(Void, "glWindowPos2svARB", [(Pointer(Const(GLshort)), "v")]),
    WglFunction(Void, "glWindowPos2svMESA", [(Pointer(Const(GLshort)), "v")]),
    WglFunction(Void, "glWindowPos3d", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
    WglFunction(Void, "glWindowPos3dARB", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
    WglFunction(Void, "glWindowPos3dMESA", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
    WglFunction(Void, "glWindowPos3dv", [(Pointer(Const(GLdouble)), "v")]),
    WglFunction(Void, "glWindowPos3dvARB", [(Pointer(Const(GLdouble)), "v")]),
    WglFunction(Void, "glWindowPos3dvMESA", [(Pointer(Const(GLdouble)), "v")]),
    WglFunction(Void, "glWindowPos3f", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
    WglFunction(Void, "glWindowPos3fARB", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
    WglFunction(Void, "glWindowPos3fMESA", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
    WglFunction(Void, "glWindowPos3fv", [(Array(Const(GLfloat), "3"), "v")]),
    WglFunction(Void, "glWindowPos3fvARB", [(Array(Const(GLfloat), "3"), "v")]),
    WglFunction(Void, "glWindowPos3fvMESA", [(Array(Const(GLfloat), "3"), "v")]),
    WglFunction(Void, "glWindowPos3i", [(GLint, "x"), (GLint, "y"), (GLint, "z")]),
    WglFunction(Void, "glWindowPos3iARB", [(GLint, "x"), (GLint, "y"), (GLint, "z")]),
    WglFunction(Void, "glWindowPos3iMESA", [(GLint, "x"), (GLint, "y"), (GLint, "z")]),
    WglFunction(Void, "glWindowPos3iv", [(Pointer(Const(GLint)), "v")]),
    WglFunction(Void, "glWindowPos3ivARB", [(Pointer(Const(GLint)), "v")]),
    WglFunction(Void, "glWindowPos3ivMESA", [(Pointer(Const(GLint)), "v")]),
    WglFunction(Void, "glWindowPos3s", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
    WglFunction(Void, "glWindowPos3sARB", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
    WglFunction(Void, "glWindowPos3sMESA", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
    WglFunction(Void, "glWindowPos3sv", [(Pointer(Const(GLshort)), "v")]),
    WglFunction(Void, "glWindowPos3svARB", [(Pointer(Const(GLshort)), "v")]),
    WglFunction(Void, "glWindowPos3svMESA", [(Pointer(Const(GLshort)), "v")]),
    WglFunction(Void, "glWindowPos4dMESA", [(GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
    WglFunction(Void, "glWindowPos4dvMESA", [(Pointer(Const(GLdouble)), "v")]),
    WglFunction(Void, "glWindowPos4fMESA", [(GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
    WglFunction(Void, "glWindowPos4fvMESA", [(Pointer(Const(GLfloat)), "v")]),
    WglFunction(Void, "glWindowPos4iMESA", [(GLint, "x"), (GLint, "y"), (GLint, "z"), (GLint, "w")]),
    WglFunction(Void, "glWindowPos4ivMESA", [(Pointer(Const(GLint)), "v")]),
    WglFunction(Void, "glWindowPos4sMESA", [(GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
    WglFunction(Void, "glWindowPos4svMESA", [(Pointer(Const(GLshort)), "v")]),
    WglFunction(Void, "glMultiModeDrawArraysIBM", [(Pointer(Const(GLenum)), "mode"), (Pointer(Const(GLint)), "first"), (Pointer(Const(GLsizei)), "count"), (GLsizei, "primcount"), (GLint, "modestride")]),
    WglFunction(Void, "glMultiModeDrawElementsIBM", [(Pointer(Const(GLenum)), "mode"), (Pointer(Const(GLsizei)), "count"), (GLenum, "type"), (Pointer(Const(Pointer(Const(GLvoid)))), "indices"), (GLsizei, "primcount"), (GLint, "modestride")]),
    WglFunction(Void, "glDeleteFencesNV", [(GLsizei, "n"), (Pointer(Const(GLuint)), "fences")]),
    WglFunction(Void, "glFinishFenceNV", [(GLuint, "fence")]),
    WglFunction(Void, "glGenFencesNV", [(GLsizei, "n"), (Pointer(GLuint), "fences")]),
    WglFunction(Void, "glGetFenceivNV", [(GLuint, "fence"), (GLenum, "pname"), (Pointer(GLint), "params")]),
    WglFunction(GLboolean, "glIsFenceNV", [(GLuint, "fence")]),
    WglFunction(Void, "glSetFenceNV", [(GLuint, "fence"), (GLenum, "condition")]),
    WglFunction(GLboolean, "glTestFenceNV", [(GLuint, "fence")]),
    WglFunction(GLboolean, "glAreProgramsResidentNV", [(GLsizei, "n"), (Pointer(Const(GLuint)), "ids"), (Pointer(GLboolean), "residences")]),
    WglFunction(Void, "glBindProgramARB", [(GLenum, "target"), (GLuint, "program")]),
    WglFunction(Void, "glBindProgramNV", [(GLenum, "target"), (GLuint, "program")]),
    WglFunction(Void, "glDeleteProgramsARB", [(GLsizei, "n"), (Pointer(Const(GLuint)), "programs")]),
    WglFunction(Void, "glDeleteProgramsNV", [(GLsizei, "n"), (Pointer(Const(GLuint)), "programs")]),
    WglFunction(Void, "glExecuteProgramNV", [(GLenum, "target"), (GLuint, "id"), (Array(Const(GLfloat), "4"), "params")]),
    WglFunction(Void, "glGenProgramsARB", [(GLsizei, "n"), (Pointer(GLuint), "programs")]),
    WglFunction(Void, "glGenProgramsNV", [(GLsizei, "n"), (Pointer(GLuint), "programs")]),
    WglFunction(Void, "glGetProgramParameterdvNV", [(GLenum, "target"), (GLuint, "index"), (GLenum, "pname"), (Array(GLdouble, "4"), "params")]),
    WglFunction(Void, "glGetProgramParameterfvNV", [(GLenum, "target"), (GLuint, "index"), (GLenum, "pname"), (Array(GLfloat, "4"), "params")]),
    WglFunction(Void, "glGetProgramStringNV", [(GLuint, "id"), (GLenum, "pname"), (Pointer(GLubyte), "program")]),
    WglFunction(Void, "glGetProgramivNV", [(GLuint, "id"), (GLenum, "pname"), (Pointer(GLint), "params")]),
    WglFunction(Void, "glGetTrackMatrixivNV", [(GLenum, "target"), (GLuint, "address"), (GLenum, "pname"), (Array(GLint, "1"), "params")]),
    WglFunction(Void, "glGetVertexAttribPointerv", [(GLuint, "index"), (GLenum, "pname"), (Pointer(Pointer(GLvoid)), "pointer")]),
    WglFunction(Void, "glGetVertexAttribPointervARB", [(GLuint, "index"), (GLenum, "pname"), (Pointer(Pointer(GLvoid)), "pointer")]),
    WglFunction(Void, "glGetVertexAttribPointervNV", [(GLuint, "index"), (GLenum, "pname"), (Pointer(Pointer(GLvoid)), "pointer")]),
    WglFunction(Void, "glGetVertexAttribdvNV", [(GLuint, "index"), (GLenum, "pname"), (Pointer(GLdouble), "params")]),
    WglFunction(Void, "glGetVertexAttribfvNV", [(GLuint, "index"), (GLenum, "pname"), (Pointer(GLfloat), "params")]),
    WglFunction(Void, "glGetVertexAttribivNV", [(GLuint, "index"), (GLenum, "pname"), (Pointer(GLint), "params")]),
    WglFunction(GLboolean, "glIsProgramARB", [(GLuint, "program")]),
    WglFunction(GLboolean, "glIsProgramNV", [(GLuint, "program")]),
    WglFunction(Void, "glLoadProgramNV", [(GLenum, "target"), (GLuint, "id"), (GLsizei, "len"), (Pointer(Const(GLubyte)), "program")]),
    WglFunction(Void, "glProgramParameters4dvNV", [(GLenum, "target"), (GLuint, "index"), (GLuint, "num"), (Pointer(Const(GLdouble)), "params")]),
    WglFunction(Void, "glProgramParameters4fvNV", [(GLenum, "target"), (GLuint, "index"), (GLuint, "num"), (Pointer(Const(GLfloat)), "params")]),
    WglFunction(Void, "glRequestResidentProgramsNV", [(GLsizei, "n"), (Pointer(Const(GLuint)), "ids")]),
    WglFunction(Void, "glTrackMatrixNV", [(GLenum, "target"), (GLuint, "address"), (GLenum, "matrix"), (GLenum, "transform")]),
    WglFunction(Void, "glVertexAttrib1dNV", [(GLuint, "index"), (GLdouble, "x")]),
    WglFunction(Void, "glVertexAttrib1dvNV", [(GLuint, "index"), (Array(Const(GLdouble), "1"), "v")]),
    WglFunction(Void, "glVertexAttrib1fNV", [(GLuint, "index"), (GLfloat, "x")]),
    WglFunction(Void, "glVertexAttrib1fvNV", [(GLuint, "index"), (Array(Const(GLfloat), "1"), "v")]),
    WglFunction(Void, "glVertexAttrib1sNV", [(GLuint, "index"), (GLshort, "x")]),
    WglFunction(Void, "glVertexAttrib1svNV", [(GLuint, "index"), (Array(Const(GLshort), "1"), "v")]),
    WglFunction(Void, "glVertexAttrib2dNV", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y")]),
    WglFunction(Void, "glVertexAttrib2dvNV", [(GLuint, "index"), (Array(Const(GLdouble), "2"), "v")]),
    WglFunction(Void, "glVertexAttrib2fNV", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y")]),
    WglFunction(Void, "glVertexAttrib2fvNV", [(GLuint, "index"), (Array(Const(GLfloat), "2"), "v")]),
    WglFunction(Void, "glVertexAttrib2sNV", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y")]),
    WglFunction(Void, "glVertexAttrib2svNV", [(GLuint, "index"), (Array(Const(GLshort), "2"), "v")]),
    WglFunction(Void, "glVertexAttrib3dNV", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z")]),
    WglFunction(Void, "glVertexAttrib3dvNV", [(GLuint, "index"), (Array(Const(GLdouble), "3"), "v")]),
    WglFunction(Void, "glVertexAttrib3fNV", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z")]),
    WglFunction(Void, "glVertexAttrib3fvNV", [(GLuint, "index"), (Array(Const(GLfloat), "3"), "v")]),
    WglFunction(Void, "glVertexAttrib3sNV", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z")]),
    WglFunction(Void, "glVertexAttrib3svNV", [(GLuint, "index"), (Array(Const(GLshort), "3"), "v")]),
    WglFunction(Void, "glVertexAttrib4dNV", [(GLuint, "index"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
    WglFunction(Void, "glVertexAttrib4dvNV", [(GLuint, "index"), (Array(Const(GLdouble), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4fNV", [(GLuint, "index"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
    WglFunction(Void, "glVertexAttrib4fvNV", [(GLuint, "index"), (Array(Const(GLfloat), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4sNV", [(GLuint, "index"), (GLshort, "x"), (GLshort, "y"), (GLshort, "z"), (GLshort, "w")]),
    WglFunction(Void, "glVertexAttrib4svNV", [(GLuint, "index"), (Array(Const(GLshort), "4"), "v")]),
    WglFunction(Void, "glVertexAttrib4ubNV", [(GLuint, "index"), (GLubyte, "x"), (GLubyte, "y"), (GLubyte, "z"), (GLubyte, "w")]),
    WglFunction(Void, "glVertexAttrib4ubvNV", [(GLuint, "index"), (Array(Const(GLubyte), "4"), "v")]),
    WglFunction(Void, "glVertexAttribPointerNV", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (Pointer(Const(GLvoid)), "pointer")]),
    WglFunction(Void, "glVertexAttribs1dvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLdouble)), "v")]),
    WglFunction(Void, "glVertexAttribs1fvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLfloat)), "v")]),
    WglFunction(Void, "glVertexAttribs1svNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLshort)), "v")]),
    WglFunction(Void, "glVertexAttribs2dvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLdouble)), "v")]),
    WglFunction(Void, "glVertexAttribs2fvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLfloat)), "v")]),
    WglFunction(Void, "glVertexAttribs2svNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLshort)), "v")]),
    WglFunction(Void, "glVertexAttribs3dvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLdouble)), "v")]),
    WglFunction(Void, "glVertexAttribs3fvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLfloat)), "v")]),
    WglFunction(Void, "glVertexAttribs3svNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLshort)), "v")]),
    WglFunction(Void, "glVertexAttribs4dvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLdouble)), "v")]),
    WglFunction(Void, "glVertexAttribs4fvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLfloat)), "v")]),
    WglFunction(Void, "glVertexAttribs4svNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLshort)), "v")]),
    WglFunction(Void, "glVertexAttribs4ubvNV", [(GLuint, "index"), (GLsizei, "n"), (Pointer(Const(GLubyte)), "v")]),
    WglFunction(Void, "glGetTexBumpParameterfvATI", [(GLenum, "pname"), (Pointer(GLfloat), "param")]),
    WglFunction(Void, "glGetTexBumpParameterivATI", [(GLenum, "pname"), (Pointer(GLint), "param")]),
    WglFunction(Void, "glTexBumpParameterfvATI", [(GLenum, "pname"), (Pointer(Const(GLfloat)), "param")]),
    WglFunction(Void, "glTexBumpParameterivATI", [(GLenum, "pname"), (Pointer(Const(GLint)), "param")]),
    WglFunction(Void, "glAlphaFragmentOp1ATI", [(GLenum, "op"), (GLuint, "dst"), (GLuint, "dstMod"), (GLuint, "arg1"), (GLuint, "arg1Rep"), (GLuint, "arg1Mod")]),
    WglFunction(Void, "glAlphaFragmentOp2ATI", [(GLenum, "op"), (GLuint, "dst"), (GLuint, "dstMod"), (GLuint, "arg1"), (GLuint, "arg1Rep"), (GLuint, "arg1Mod"), (GLuint, "arg2"), (GLuint, "arg2Rep"), (GLuint, "arg2Mod")]),
    WglFunction(Void, "glAlphaFragmentOp3ATI", [(GLenum, "op"), (GLuint, "dst"), (GLuint, "dstMod"), (GLuint, "arg1"), (GLuint, "arg1Rep"), (GLuint, "arg1Mod"), (GLuint, "arg2"), (GLuint, "arg2Rep"), (GLuint, "arg2Mod"), (GLuint, "arg3"), (GLuint, "arg3Rep"), (GLuint, "arg3Mod")]),
    WglFunction(Void, "glBeginFragmentShaderATI", []),
    WglFunction(Void, "glBindFragmentShaderATI", [(GLuint, "id")]),
    WglFunction(Void, "glColorFragmentOp1ATI", [(GLenum, "op"), (GLuint, "dst"), (GLuint, "dstMask"), (GLuint, "dstMod"), (GLuint, "arg1"), (GLuint, "arg1Rep"), (GLuint, "arg1Mod")]),
    WglFunction(Void, "glColorFragmentOp2ATI", [(GLenum, "op"), (GLuint, "dst"), (GLuint, "dstMask"), (GLuint, "dstMod"), (GLuint, "arg1"), (GLuint, "arg1Rep"), (GLuint, "arg1Mod"), (GLuint, "arg2"), (GLuint, "arg2Rep"), (GLuint, "arg2Mod")]),
    WglFunction(Void, "glColorFragmentOp3ATI", [(GLenum, "op"), (GLuint, "dst"), (GLuint, "dstMask"), (GLuint, "dstMod"), (GLuint, "arg1"), (GLuint, "arg1Rep"), (GLuint, "arg1Mod"), (GLuint, "arg2"), (GLuint, "arg2Rep"), (GLuint, "arg2Mod"), (GLuint, "arg3"), (GLuint, "arg3Rep"), (GLuint, "arg3Mod")]),
    WglFunction(Void, "glDeleteFragmentShaderATI", [(GLuint, "id")]),
    WglFunction(Void, "glEndFragmentShaderATI", []),
    WglFunction(GLuint, "glGenFragmentShadersATI", [(GLuint, "range")]),
    WglFunction(Void, "glPassTexCoordATI", [(GLuint, "dst"), (GLuint, "coord"), (GLenum, "swizzle")]),
    WglFunction(Void, "glSampleMapATI", [(GLuint, "dst"), (GLuint, "interp"), (GLenum, "swizzle")]),
    WglFunction(Void, "glSetFragmentShaderConstantATI", [(GLuint, "dst"), (Pointer(Const(GLfloat)), "value")]),
    WglFunction(Void, "glPointParameteri", [(GLenum, "pname"), (GLint, "param")]),
    WglFunction(Void, "glPointParameteriNV", [(GLenum, "pname"), (GLint, "param")]),
    WglFunction(Void, "glPointParameteriv", [(GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
    WglFunction(Void, "glPointParameterivNV", [(GLenum, "pname"), (Pointer(Const(GLint)), "params")]),
    WglFunction(Void, "glActiveStencilFaceEXT", [(GLenum, "face")]),
    WglFunction(Void, "glBindVertexArrayAPPLE", [(GLuint, "array")]),
    WglFunction(Void, "glDeleteVertexArrays", [(GLsizei, "n"), (Pointer(Const(GLuint)), "arrays")]),
    WglFunction(Void, "glDeleteVertexArraysAPPLE", [(GLsizei, "n"), (Pointer(Const(GLuint)), "arrays")]),
    WglFunction(Void, "glGenVertexArraysAPPLE", [(GLsizei, "n"), (Pointer(GLuint), "arrays")]),
    WglFunction(GLboolean, "glIsVertexArray", [(GLuint, "array")]),
    WglFunction(GLboolean, "glIsVertexArrayAPPLE", [(GLuint, "array")]),
    WglFunction(Void, "glGetProgramNamedParameterdvNV", [(GLuint, "id"), (GLsizei, "len"), (Pointer(Const(GLubyte)), "name"), (Array(GLdouble, "4"), "params")]),
    WglFunction(Void, "glGetProgramNamedParameterfvNV", [(GLuint, "id"), (GLsizei, "len"), (Pointer(Const(GLubyte)), "name"), (Array(GLfloat, "4"), "params")]),
    WglFunction(Void, "glProgramNamedParameter4dNV", [(GLuint, "id"), (GLsizei, "len"), (Pointer(Const(GLubyte)), "name"), (GLdouble, "x"), (GLdouble, "y"), (GLdouble, "z"), (GLdouble, "w")]),
    WglFunction(Void, "glProgramNamedParameter4dvNV", [(GLuint, "id"), (GLsizei, "len"), (Pointer(Const(GLubyte)), "name"), (Array(Const(GLdouble), "4"), "v")]),
    WglFunction(Void, "glProgramNamedParameter4fNV", [(GLuint, "id"), (GLsizei, "len"), (Pointer(Const(GLubyte)), "name"), (GLfloat, "x"), (GLfloat, "y"), (GLfloat, "z"), (GLfloat, "w")]),
    WglFunction(Void, "glProgramNamedParameter4fvNV", [(GLuint, "id"), (GLsizei, "len"), (Pointer(Const(GLubyte)), "name"), (Array(Const(GLfloat), "4"), "v")]),
    WglFunction(Void, "glDepthBoundsEXT", [(GLclampd, "zmin"), (GLclampd, "zmax")]),
    WglFunction(Void, "glBlendEquationSeparate", [(GLenum, "modeRGB"), (GLenum, "modeA")]),
    WglFunction(Void, "glBlendEquationSeparateEXT", [(GLenum, "modeRGB"), (GLenum, "modeA")]),
    WglFunction(Void, "glBlendEquationSeparateATI", [(GLenum, "modeRGB"), (GLenum, "modeA")]),
    WglFunction(Void, "glBindFramebuffer", [(GLenum, "target"), (GLuint, "framebuffer")]),
    WglFunction(Void, "glBindFramebufferEXT", [(GLenum, "target"), (GLuint, "framebuffer")]),
    WglFunction(Void, "glBindRenderbuffer", [(GLenum, "target"), (GLuint, "renderbuffer")]),
    WglFunction(Void, "glBindRenderbufferEXT", [(GLenum, "target"), (GLuint, "renderbuffer")]),
    WglFunction(GLenum, "glCheckFramebufferStatus", [(GLenum, "target")]),
    WglFunction(GLenum, "glCheckFramebufferStatusEXT", [(GLenum, "target")]),
    WglFunction(Void, "glDeleteFramebuffers", [(GLsizei, "n"), (Pointer(Const(GLuint)), "framebuffers")]),
    WglFunction(Void, "glDeleteFramebuffersEXT", [(GLsizei, "n"), (Pointer(Const(GLuint)), "framebuffers")]),
    WglFunction(Void, "glDeleteRenderbuffers", [(GLsizei, "n"), (Pointer(Const(GLuint)), "renderbuffers")]),
    WglFunction(Void, "glDeleteRenderbuffersEXT", [(GLsizei, "n"), (Pointer(Const(GLuint)), "renderbuffers")]),
    WglFunction(Void, "glFramebufferRenderbuffer", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "renderbuffertarget"), (GLuint, "renderbuffer")]),
    WglFunction(Void, "glFramebufferRenderbufferEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "renderbuffertarget"), (GLuint, "renderbuffer")]),
    WglFunction(Void, "glFramebufferTexture1D", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLuint, "texture"), (GLint, "level")]),
    WglFunction(Void, "glFramebufferTexture1DEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLuint, "texture"), (GLint, "level")]),
    WglFunction(Void, "glFramebufferTexture2D", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLuint, "texture"), (GLint, "level")]),
    WglFunction(Void, "glFramebufferTexture2DEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLuint, "texture"), (GLint, "level")]),
    WglFunction(Void, "glFramebufferTexture3D", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLuint, "texture"), (GLint, "level"), (GLint, "zoffset")]),
    WglFunction(Void, "glFramebufferTexture3DEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLuint, "texture"), (GLint, "level"), (GLint, "zoffset")]),
    WglFunction(Void, "glGenFramebuffers", [(GLsizei, "n"), (Pointer(GLuint), "framebuffers")]),
    WglFunction(Void, "glGenFramebuffersEXT", [(GLsizei, "n"), (Pointer(GLuint), "framebuffers")]),
    WglFunction(Void, "glGenRenderbuffers", [(GLsizei, "n"), (Pointer(GLuint), "renderbuffers")]),
    WglFunction(Void, "glGenRenderbuffersEXT", [(GLsizei, "n"), (Pointer(GLuint), "renderbuffers")]),
    WglFunction(Void, "glGenerateMipmap", [(GLenum, "target")]),
    WglFunction(Void, "glGenerateMipmapEXT", [(GLenum, "target")]),
    WglFunction(Void, "glGetFramebufferAttachmentParameteriv", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "pname"), (Pointer(GLint), "params")]),
    WglFunction(Void, "glGetFramebufferAttachmentParameterivEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "pname"), (Pointer(GLint), "params")]),
    WglFunction(Void, "glGetRenderbufferParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLint), "params")]),
    WglFunction(Void, "glGetRenderbufferParameterivEXT", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLint), "params")]),
    WglFunction(GLboolean, "glIsFramebuffer", [(GLuint, "framebuffer")]),
    WglFunction(GLboolean, "glIsFramebufferEXT", [(GLuint, "framebuffer")]),
    WglFunction(GLboolean, "glIsRenderbuffer", [(GLuint, "renderbuffer")]),
    WglFunction(GLboolean, "glIsRenderbufferEXT", [(GLuint, "renderbuffer")]),
    WglFunction(Void, "glRenderbufferStorage", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height")]),
    WglFunction(Void, "glRenderbufferStorageEXT", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height")]),
    WglFunction(Void, "glBlitFramebuffer", [(GLint, "srcX0"), (GLint, "srcY0"), (GLint, "srcX1"), (GLint, "srcY1"), (GLint, "dstX0"), (GLint, "dstY0"), (GLint, "dstX1"), (GLint, "dstY1"), (GLbitfield, "mask"), (GLenum, "filter")]),
    WglFunction(Void, "glBlitFramebufferEXT", [(GLint, "srcX0"), (GLint, "srcY0"), (GLint, "srcX1"), (GLint, "srcY1"), (GLint, "dstX0"), (GLint, "dstY0"), (GLint, "dstX1"), (GLint, "dstY1"), (GLbitfield, "mask"), (GLenum, "filter")]),
    WglFunction(Void, "glBufferParameteriAPPLE", [(GLenum, "target"), (GLenum, "pname"), (GLint, "param")]),
    WglFunction(Void, "glFlushMappedBufferRangeAPPLE", [(GLenum, "target"), (GLintptr, "offset"), (GLsizeiptr, "size")]),
    WglFunction(Void, "glFramebufferTextureLayer", [(GLenum, "target"), (GLenum, "attachment"), (GLuint, "texture"), (GLint, "level"), (GLint, "layer")]),
    WglFunction(Void, "glFramebufferTextureLayerEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLuint, "texture"), (GLint, "level"), (GLint, "layer")]),
    WglFunction(Void, "glProvokingVertexEXT", [(GLenum, "mode")]),
    WglFunction(Void, "glProvokingVertex", [(GLenum, "mode")]),
    WglFunction(Void, "glGetTexParameterPointervAPPLE", [(GLenum, "target"), (GLenum, "pname"), (Pointer(Pointer(GLvoid)), "params")]),
    WglFunction(Void, "glTextureRangeAPPLE", [(GLenum, "target"), (GLsizei, "length"), (Pointer(GLvoid), "pointer")]),
    WglFunction(Void, "glStencilFuncSeparateATI", [(GLenum, "frontfunc"), (GLenum, "backfunc"), (GLint, "ref"), (GLuint, "mask")]),
    WglFunction(Void, "glProgramEnvParameters4fvEXT", [(GLenum, "target"), (GLuint, "index"), (GLsizei, "count"), (Pointer(Const(GLfloat)), "params")]),
    WglFunction(Void, "glProgramLocalParameters4fvEXT", [(GLenum, "target"), (GLuint, "index"), (GLsizei, "count"), (Pointer(Const(GLfloat)), "params")]),
    WglFunction(Void, "glGetQueryObjecti64vEXT", [(GLuint, "id"), (GLenum, "pname"), (Pointer(GLint64EXT), "params")]),
    WglFunction(Void, "glGetQueryObjectui64vEXT", [(GLuint, "id"), (GLenum, "pname"), (Pointer(GLuint64EXT), "params")]),
    # WGL_ARB_extensions_string
    WglFunction(Const(String), "wglGetExtensionsStringARB", [(HDC, "hdc")]),
    # WGL_ARB_pbuffer
    WglFunction(HPBUFFERARB, "wglCreatePbufferARB", [(HDC, "hDC"), (Int, "iPixelFormat"), (Int, "iWidth"), (Int, "iHeight"), (Pointer(Const(Int)), "piAttribList")]), 
    WglFunction(HDC, "wglGetPbufferDCARB", [(HPBUFFERARB, "hPbuffer")]),
    WglFunction(Int, "wglReleasePbufferDCARB", [(HPBUFFERARB, "hPbuffer"), (HDC, "hDC")]),
    WglFunction(BOOL, "wglDestroyPbufferARB", [(HPBUFFERARB, "hPbuffer")]), 
    WglFunction(BOOL, "wglQueryPbufferARB", [(HPBUFFERARB, "hPbuffer"), (Int, "iAttribute"), (Pointer(Int), "piValue")]),
    # WGL_ARB_pixel_format
    WglFunction(BOOL, "wglGetPixelFormatAttribivARB", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Pointer(attribute), "piAttributes"), (OutPointer(Int), "piValues")]),
    WglFunction(BOOL, "wglGetPixelFormatAttribfvARB", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Pointer(attribute), "piAttributes"), (OutPointer(FLOAT), "pfValues")]),
    WglFunction(BOOL, "wglChoosePixelFormatARB", [(HDC, "hdc"), (Pointer(Const(Int)), "piAttribIList"), (Pointer(Const(FLOAT)), "pfAttribFList"), (UINT, "nMaxFormats"), (Pointer(Int), "piFormats"), (Pointer(UINT), "nNumFormats")]),
    # WGL_EXT_extensions_string
    WglFunction(Const(String), "wglGetExtensionsStringEXT", []),
    # WGL_EXT_pixel_format
    WglFunction(BOOL, "wglGetPixelFormatAttribivEXT", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Pointer(attribute), "piAttributes"), (OutPointer(Int), "piValues")]),
    WglFunction(BOOL, "wglGetPixelFormatAttribfvEXT", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Pointer(attribute), "piAttributes"), (OutPointer(FLOAT), "pfValues")]),
    WglFunction(BOOL, "wglChoosePixelFormatEXT", [(HDC, "hdc"), (Pointer(Const(Int)), "piAttribIList"), (Pointer(Const(FLOAT)), "pfAttribFList"), (UINT, "nMaxFormats"), (Pointer(Int), "piFormats"), (Pointer(UINT), "nNumFormats")]),
]

if __name__ == '__main__':
    print
    print '#define _GDI32_'
    print
    print '#include <windows.h>'
    print '#include <tchar.h>'
    print '#include <GL/gl.h>'
    print '#include "glext.h"'
    print '#include "wglext.h"'
    print
    print '#include "log.hpp"'
    print
    print '#ifndef PFD_SUPPORT_DIRECTDRAW'
    print '#define PFD_SUPPORT_DIRECTDRAW 0x00002000'
    print '#endif'
    print '#ifndef PFD_SUPPORT_COMPOSITION'
    print '#define PFD_SUPPORT_COMPOSITION 0x00008000'
    print '#endif'
    print
    print '#ifdef __MINGW32__'
    print ''
    print 'typedef struct _WGLSWAP'
    print '{'
    print '    HDC hdc;'
    print '    UINT uiFlags;'
    print '} WGLSWAP, *PWGLSWAP, FAR *LPWGLSWAP;'
    print ''
    print '#define WGL_SWAPMULTIPLE_MAX 16'
    print ''
    print '#endif'
    print
    print 'extern "C" {'
    print
    wrap()
    print
    print '}'
